]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/os/seastore: move reset_preserve_handle to retry prepare step
authorMatan Breizman <mbreizma@redhat.com>
Wed, 3 Jun 2026 09:43:19 +0000 (09:43 +0000)
committerMatan Breizman <mbreizma@redhat.com>
Wed, 3 Jun 2026 09:43:19 +0000 (09:43 +0000)
do_transaction_no_callbacks() relied on with_repeat_trans_intr()
implicitly resetting the transaction before every retry attempt.

That behavior is policy, not retry mechanics, so it should live
with the caller.

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
src/crimson/os/seastore/seastore.cc

index b7db30592ddb829ff9ae5b0aa48312d5565a5bc4..bc3744b15d020c6c327801586d0c4567508460d1 100644 (file)
@@ -1652,6 +1652,10 @@ seastar::future<> SeaStore::Shard::do_transaction_no_callbacks(
   ++(shard_stats.processing_inlock_io_num);
 
   co_await with_repeat_trans_intr(
+    [&, this] {
+      // Preserve handle and rewind the external iterator before each attempt.
+      ctx.reset_preserve_handle(*transaction_manager);
+    },
     *ctx.transaction,
     seastar::coroutine::lambda([&ctx, this, FNAME](auto &t)
                               -> tm_ret {
@@ -1674,7 +1678,6 @@ seastar::future<> SeaStore::Shard::do_transaction_no_callbacks(
             ctx.iter.colls.size(),
             ctx.iter.objects.size());
 
-      ctx.reset_preserve_handle(*transaction_manager);
       std::vector<OnodeRef> onodes(ctx.iter.objects.size());
 
       // Get the total number of operations from the transaction