]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/osd/pg_backend: Add a note about unhandled rollback case
authorMatan Breizman <mbreizma@redhat.com>
Sun, 19 Mar 2023 11:26:41 +0000 (11:26 +0000)
committerMatan Breizman <mbreizma@redhat.com>
Sun, 21 May 2023 09:34:47 +0000 (09:34 +0000)
Signed-off-by: Matan Breizman <mbreizma@redhat.com>
(cherry picked from commit f616fafbd6e8beeb1cb0852407014227b3c34421)

src/crimson/osd/pg_backend.cc

index b59085c79ffb43008aed582175796a6a2d29e2fe..4c6b7fb33a9e81aafb86f42ca2aeb39f30696e9c 100644 (file)
@@ -789,12 +789,21 @@ PGBackend::rollback_iertr::future<> PGBackend::rollback(
     [this, &os, &txn, &delta_stats, &osd_op_params]
     (auto resolved_obc) {
     if (resolved_obc->obs.oi.soid.is_head()) {
-      // no-op: The resolved oid returned the head object.
+      // no-op: The resolved oid returned the head object
       logger().debug("PGBackend::rollback: loaded head_obc: {}"
                      " do nothing",
                      resolved_obc->obs.oi.soid);
       return rollback_iertr::now();
     }
+    /* TODO: https://tracker.ceph.com/issues/59114 This implementation will not
+     * behave correctly for a rados operation consisting of a mutation followed
+     * by a rollback to a snapshot since the last mutation of the object.
+     * The correct behavior would be for the rollback to undo the mutation
+     * earlier in the operation by resolving to the clone created at the start
+     * of the operation (see resolve_oid).
+     * Instead, it will select HEAD leaving that mutation intact since the SnapSet won't
+     * yet contain that clone. This behavior exists in classic as well.
+     */
     logger().debug("PGBackend::rollback: loaded clone_obc: {}",
                    resolved_obc->obs.oi.soid);
     // 1) Delete current head