From fe883f91df9d0af05b012196acd6325ee015813c Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Thu, 19 Mar 2026 11:58:16 -0400 Subject: [PATCH] rgw/dbstore: MPSerializer sets and clears locked status Signed-off-by: Casey Bodley --- src/rgw/rgw_sal_dbstore.cc | 12 ++++++++++++ src/rgw/rgw_sal_dbstore.h | 4 ++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/rgw/rgw_sal_dbstore.cc b/src/rgw/rgw_sal_dbstore.cc index 4d2394bf6b6..f9be92fda67 100644 --- a/src/rgw/rgw_sal_dbstore.cc +++ b/src/rgw/rgw_sal_dbstore.cc @@ -611,6 +611,18 @@ namespace rgw::sal { return 0; } + int MPDBSerializer::try_lock(const DoutPrefixProvider *dpp, ceph::timespan dur, optional_yield y) + { + locked = true; + return 0; + } + + int MPDBSerializer::unlock(const DoutPrefixProvider* dpp, optional_yield y) + { + clear_locked(); + return 0; + } + std::unique_ptr DBObject::get_serializer(const DoutPrefixProvider *dpp, optional_yield y, const std::string& lock_name) diff --git a/src/rgw/rgw_sal_dbstore.h b/src/rgw/rgw_sal_dbstore.h index 2994beed017..262b2b5ae3f 100644 --- a/src/rgw/rgw_sal_dbstore.h +++ b/src/rgw/rgw_sal_dbstore.h @@ -629,8 +629,8 @@ protected: public: MPDBSerializer(const DoutPrefixProvider *dpp, DBStore* store, DBObject* obj, const std::string& lock_name) {} - virtual int try_lock(const DoutPrefixProvider *dpp, ceph::timespan dur, optional_yield y) override {return 0; } - virtual int unlock(const DoutPrefixProvider* dpp, optional_yield y) override { return 0;} + virtual int try_lock(const DoutPrefixProvider *dpp, ceph::timespan dur, optional_yield y) override; + virtual int unlock(const DoutPrefixProvider* dpp, optional_yield y) override; }; class DBAtomicWriter : public StoreWriter { -- 2.47.3