From: Yingxin Cheng Date: Tue, 16 Apr 2024 07:53:47 +0000 (+0800) Subject: crimson/common/operation: fix and move exit() after entering the next phase X-Git-Tag: v20.0.0~2141^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F56912%2Fhead;p=ceph.git crimson/common/operation: fix and move exit() after entering the next phase If exit/unlock the barrier before entering the next phase, it is possible for the next request to exit the barrier at the same time, and enters the next phase first, causing reorder issues. Signed-off-by: Yingxin Cheng --- diff --git a/src/crimson/common/operation.h b/src/crimson/common/operation.h index bd3d79eec42b1..82d0d548442e8 100644 --- a/src/crimson/common/operation.h +++ b/src/crimson/common/operation.h @@ -528,18 +528,18 @@ public: if (wait_fut.has_value()) { return wait_fut.value().then([this, &stage, t=std::move(t)] () mutable { auto fut = t.maybe_record_blocking(stage.enter(t), stage); - exit(); return std::move(fut).then( [this, t=std::move(t)](auto &&barrier_ref) mutable { + exit(); barrier = std::move(barrier_ref); return seastar::now(); }); }); } else { auto fut = t.maybe_record_blocking(stage.enter(t), stage); - exit(); return std::move(fut).then( [this, t=std::move(t)](auto &&barrier_ref) mutable { + exit(); barrier = std::move(barrier_ref); return seastar::now(); });