Skip to content

Commit d14d87b

Browse files
committed
crimson/common/gated: Comment out ceph_assert for shard ID check
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 <[email protected]>
1 parent 1071cc3 commit d14d87b

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)