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: v16.1.0~2796^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d4b1cc61e6526d325fd759f98e13e5a10523f5f7;p=ceph.git PrimaryLogPG: add assert that we aren't trimming past last_update_ondisk Signed-off-by: Samuel Just --- diff --git a/src/osd/PeeringState.h b/src/osd/PeeringState.h index 160ca0090e1b..ede2258065b8 100644 --- a/src/osd/PeeringState.h +++ b/src/osd/PeeringState.h @@ -2273,6 +2273,10 @@ public: return last_update_applied; } + eversion_t get_last_update_ondisk() const { + return last_update_ondisk; + } + bool debug_has_dirty_state() const { return dirty_info || dirty_big_info; } diff --git a/src/osd/PrimaryLogPG.h b/src/osd/PrimaryLogPG.h index fd303e2ac544..afa54ab503ad 100644 --- a/src/osd/PrimaryLogPG.h +++ b/src/osd/PrimaryLogPG.h @@ -463,6 +463,9 @@ public: bool transaction_applied, ObjectStore::Transaction &t, bool async = false) override { + if (is_primary()) { + ceph_assert(trim_to <= recovery_state.get_last_update_ondisk()); + } if (hset_history) { recovery_state.update_hset(*hset_history); }