]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/osd/pg: rollback obc unconditionally before error log
authorSamuel Just <sjust@redhat.com>
Wed, 13 Dec 2023 20:43:35 +0000 (12:43 -0800)
committerSamuel Just <sjust@redhat.com>
Wed, 13 Dec 2023 20:43:35 +0000 (12:43 -0800)
If we're recording an error to the log, the write definitionally did not
happen.  Rollback the obc regardless of the specific error code.

Introduced: 1d98e8da
Fixes: https://tracker.ceph.com/issues/63820
Signed-off-by: Samuel Just <sjust@redhat.com>
src/crimson/osd/pg.cc

index 00592eb8347e2164254fbbc65c88334dbf67bded..a0b74ff9b21e195d98055bdca2870efe3c24d397 100644 (file)
@@ -938,14 +938,8 @@ PG::do_osd_ops_execute(
     [this, error_func_ptr, rollbacker, failure_func_ptr]
     (const std::error_code& e) mutable {
 
-    PG::interruptible_future<> maybe_rollback_fut = seastar::now();
     ceph_tid_t rep_tid = shard_services.get_tid();
-
-    if (e.value() == ENOENT) {
-      maybe_rollback_fut = rollbacker.rollback_obc_if_modified(e);
-    }
-
-    return maybe_rollback_fut.then_interruptible(
+    return rollbacker.rollback_obc_if_modified(e).then_interruptible(
     [error_func_ptr, e, rep_tid, failure_func_ptr] {
       // record error log
       return (*error_func_ptr)(e, rep_tid).then(