File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 29
29
#include < seastar/util/modules.hh>
30
30
#include < cassert>
31
31
#include < exception>
32
+ #include < mutex>
32
33
#include < optional>
33
34
#include < utility>
34
35
#endif
35
36
36
37
#ifdef SEASTAR_DEBUG
37
- // See: https://tracker.ceph.com/issues/64332
38
- // #define SEASTAR_GATE_HOLDER_DEBUG
38
+ #define SEASTAR_GATE_HOLDER_DEBUG
39
39
#endif
40
40
41
41
namespace seastar {
@@ -174,14 +174,17 @@ public:
174
174
#ifdef SEASTAR_GATE_HOLDER_DEBUG
175
175
using member_hook_t = boost::intrusive::list_member_hook<boost::intrusive::link_mode<boost::intrusive::auto_unlink>>;
176
176
member_hook_t _link;
177
+ std::mutex _debug_mutex;
177
178
178
179
void debug_hold_gate () noexcept {
179
180
if (_g) {
181
+ std::lock_guard<std::mutex> lock (_debug_mutex);
180
182
_g->_holders .push_back (*this );
181
183
}
182
184
}
183
185
184
186
void debug_release_gate () noexcept {
187
+ seastar::lock_guard<seastar::mutex> lock (_debug_mutex);
185
188
_link.unlink ();
186
189
}
187
190
#else // SEASTAR_GATE_HOLDER_DEBUG
You can’t perform that action at this time.
0 commit comments