]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/os/seastore/transaction_manager: fix write pipeline phase leak 57129/head
authorXuehan Xu <xuxuehan@qianxin.com>
Wed, 24 Apr 2024 09:00:53 +0000 (17:00 +0800)
committerXuehan Xu <xuxuehan@qianxin.com>
Mon, 29 Apr 2024 08:03:37 +0000 (16:03 +0800)
At present, if a transaction gets interrupted right after it enters
WritePipeline::ReserveProjectedUsage and before any later continuations
get executed, WritePipeline::ReserveProjectedUsage will be locked
forever.

Signed-off-by: Xuehan Xu <xuxuehan@qianxin.com>
src/crimson/os/seastore/transaction.h
src/crimson/os/seastore/transaction_manager.cc

index a283982f699e19116be8cc0444dafbb98e2ffa85..cac12d71b3a9dfad03f7467d93c8d5580bbf8ec4 100644 (file)
@@ -385,6 +385,7 @@ public:
   }
 
   ~Transaction() {
+    get_handle().exit();
     on_destruct(*this);
     invalidate_clear_write_set();
   }
@@ -422,6 +423,7 @@ public:
     if (!has_reset) {
       has_reset = true;
     }
+    get_handle().exit();
   }
 
   bool did_reset() const {
index 5869df8634096c5ffed8d9913388fda1dcc27519..c33d93169197e9b72da7e6cfaf5e3b145dbe4910 100644 (file)
@@ -392,8 +392,6 @@ TransactionManager::do_submit_transaction(
        ceph_assert(0 == "Hit error submitting to journal");
       })
     );
-  }).finally([&tref]() {
-      tref.get_handle().exit();
   });
 }