]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/common/gated: Comment out ceph_assert for shard ID check 58986/head
authorNitzan Mordechai <nmordech@redhat.com>
Wed, 28 Aug 2024 12:49:27 +0000 (12:49 +0000)
committerNitzan Mordechai <nmordech@redhat.com>
Thu, 5 Sep 2024 10:32:21 +0000 (10:32 +0000)
After adding sid (shard ID) to Gated, each shard should have its own gate.
However, some users of Gated had a single instance, which either failed
these assertions or created the Gated object on the wrong shard.
A tracker issue #67773 was opened for this, and this commit comments out
the assertions until the issue is resolved.

Signed-off-by: NitzanMordhai <nmordech@redhat.com>
src/crimson/common/gated.h

index 28e3620e65489c49677c5edfb089ce92a869060f..f7faef87970806934cc4ac3c54de919627583ca8 100644 (file)
@@ -31,13 +31,13 @@ class Gated {
 
   template <typename Func, typename T>
   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>(func));
   }
 
   template <typename Func, typename T>
   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>(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 <typename Func>
   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>(func));
   }