Skip to content

Commit e4b5a32

Browse files
committed
common/gated: enable ceph_assert on shard id
Checking that each call to gate on the same shard the gate assigned to. Fixes: https://tracker.ceph.com/issues/67773 Signed-off-by: Nitzan Mordechai <[email protected]>
1 parent 711c10c commit e4b5a32

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/crimson/common/gated.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ class Gated {
3131

3232
template <typename Func, typename T>
3333
inline void dispatch_in_background(const char* what, T& who, Func&& func) {
34-
//ceph_assert(seastar::this_shard_id() == sid);
34+
ceph_assert(seastar::this_shard_id() == sid);
3535
(void) dispatch(what, who, std::forward<Func>(func));
3636
}
3737

3838
template <typename Func, typename T>
3939
inline seastar::future<> dispatch(const char* what, T& who, Func&& func) {
40-
//ceph_assert(seastar::this_shard_id() == sid);
40+
ceph_assert(seastar::this_shard_id() == sid);
4141
return seastar::with_gate(pending_dispatch, std::forward<Func>(func)
4242
).handle_exception([what, &who] (std::exception_ptr eptr) {
4343
if (*eptr.__cxa_exception_type() == typeid(system_shutdown_exception)) {
@@ -58,7 +58,7 @@ class Gated {
5858

5959
template <typename Func>
6060
auto simple_dispatch(const char* what, Func&& func) {
61-
//ceph_assert(seastar::this_shard_id() == sid);
61+
ceph_assert(seastar::this_shard_id() == sid);
6262
return seastar::with_gate(pending_dispatch, std::forward<Func>(func));
6363
}
6464

0 commit comments

Comments
 (0)