From: Samuel Just Date: Fri, 13 Mar 2020 22:43:58 +0000 (-0700) Subject: PrimaryLogPG: add assert that we aren't trimming past last_update_ondisk X-Git-Tag: v14.2.10~45^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c0a4156490207675ec1b2f4d10577d9bab9ca18f;p=ceph.git PrimaryLogPG: add assert that we aren't trimming past last_update_ondisk Signed-off-by: Samuel Just (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 --- diff --git a/src/osd/PrimaryLogPG.h b/src/osd/PrimaryLogPG.h index b0fee77c91c..56fdc87fe60 100644 --- a/src/osd/PrimaryLogPG.h +++ b/src/osd/PrimaryLogPG.h @@ -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; }