]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
PrimaryLogPG: add assert that we aren't trimming past last_update_ondisk
authorSamuel Just <sjust@redhat.com>
Fri, 13 Mar 2020 22:43:58 +0000 (15:43 -0700)
committerNathan Cutler <ncutler@suse.com>
Fri, 8 May 2020 05:02:29 +0000 (07:02 +0200)
Signed-off-by: Samuel Just <sjust@redhat.com>
(cherry picked from commit d4b1cc61e6526d325fd759f98e13e5a10523f5f7)

Conflicts:
src/osd/PeeringState.h
- not introducing this function since it is just a getter and it's not
  clear where it should go in nautilus
        src/osd/PrimaryLogPG.h
- use last_update_ondisk directly instead of via getter function

src/osd/PrimaryLogPG.h

index b0fee77c91c0011a0d8a3d81aca7e630ca0045ec..56fdc87fe60915e8c064fded3e5ecbcfd9155b58 100644 (file)
@@ -446,6 +446,9 @@ public:
     bool transaction_applied,
     ObjectStore::Transaction &t,
     bool async = false) override {
+    if (is_primary()) {
+      ceph_assert(trim_to <= last_update_ondisk);
+    }
     if (hset_history) {
       info.hit_set = *hset_history;
     }