From: Nitzan Mordechai Date: Tue, 17 Sep 2024 12:20:29 +0000 (+0000) Subject: common/gated: enable ceph_assert on shard id X-Git-Tag: testing/wip-vshankar-testing-20240923.114534-debug~8^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e4b5a327bf4c4d601be8bdd5210ae74f2eed7f28;p=ceph-ci.git 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 --- diff --git a/src/crimson/common/gated.h b/src/crimson/common/gated.h index f7faef87970..28e3620e654 100644 --- a/src/crimson/common/gated.h +++ b/src/crimson/common/gated.h @@ -31,13 +31,13 @@ class Gated { template inline void dispatch_in_background(const char* what, T& who, Func&& func) { - //ceph_assert(seastar::this_shard_id() == sid); + ceph_assert(seastar::this_shard_id() == sid); (void) dispatch(what, who, std::forward(func)); } template inline seastar::future<> dispatch(const char* what, T& who, Func&& func) { - //ceph_assert(seastar::this_shard_id() == sid); + ceph_assert(seastar::this_shard_id() == sid); return seastar::with_gate(pending_dispatch, std::forward(func) ).handle_exception([what, &who] (std::exception_ptr eptr) { if (*eptr.__cxa_exception_type() == typeid(system_shutdown_exception)) { @@ -58,7 +58,7 @@ class Gated { template auto simple_dispatch(const char* what, Func&& func) { - //ceph_assert(seastar::this_shard_id() == sid); + ceph_assert(seastar::this_shard_id() == sid); return seastar::with_gate(pending_dispatch, std::forward(func)); }