From: Zhang Song Date: Mon, 3 Apr 2023 11:15:21 +0000 (+0800) Subject: crimson/os/seastore: ensure transaction commit order X-Git-Tag: v19.0.0~1399^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F50839%2Fhead;p=ceph.git crimson/os/seastore: ensure transaction commit order The previous implementation acquired the throttler first, which could result in an unordered wakeup sequence. Signed-off-by: Zhang Song --- diff --git a/src/crimson/os/seastore/seastore.h b/src/crimson/os/seastore/seastore.h index bc4cce027f78..9ce77f7a826c 100644 --- a/src/crimson/os/seastore/seastore.h +++ b/src/crimson/os/seastore/seastore.h @@ -233,10 +233,10 @@ private: transaction_manager->create_transaction(src, tname)), std::forward(f), [this, op_type](auto &ctx, auto &f) { - return throttler.get(1).then([&ctx] { - return ctx.transaction->get_handle().take_collection_lock( - static_cast(*(ctx.ch)).ordering_lock - ); + return ctx.transaction->get_handle().take_collection_lock( + static_cast(*(ctx.ch)).ordering_lock + ).then([this] { + return throttler.get(1); }).then([&, this] { return repeat_eagain([&, this] { ctx.reset_preserve_handle(*transaction_manager);