From: Xuehan Xu Date: Sat, 5 Sep 2020 02:58:05 +0000 (+0800) Subject: crimson/osd: construct log_keys_debug when reading pglog entries X-Git-Tag: v16.1.0~1186^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F37000%2Fhead;p=ceph.git crimson/osd: construct log_keys_debug when reading pglog entries Fixes: https://tracker.ceph.com/issues/47226 Signed-off-by: Xuehan Xu --- diff --git a/src/osd/PGLog.h b/src/osd/PGLog.h index 89da871e9b89..68075ca6d924 100644 --- a/src/osd/PGLog.h +++ b/src/osd/PGLog.h @@ -1660,8 +1660,8 @@ public: ) { return read_log_and_missing_crimson( store, ch, info, - log, missing, pgmeta_oid, - this); + log, (pg_log_debug ? &log_keys_debug : nullptr), + missing, pgmeta_oid, this); } template @@ -1670,6 +1670,7 @@ public: crimson::os::CollectionRef ch; const pg_info_t &info; IndexedLog &log; + std::set* log_keys_debug = NULL; missing_type &missing; ghobject_t pgmeta_oid; const DoutPrefixProvider *dpp; @@ -1727,6 +1728,8 @@ public: ceph_assert(last_e.version.epoch <= e.version.epoch); } entries.push_back(e); + if (log_keys_debug) + log_keys_debug->insert(e.get_key_name()); } } @@ -1767,6 +1770,7 @@ public: crimson::os::CollectionRef ch, const pg_info_t &info, IndexedLog &log, + std::set* log_keys_debug, missing_type &missing, ghobject_t pgmeta_oid, const DoutPrefixProvider *dpp = nullptr @@ -1775,7 +1779,8 @@ public: << ch->get_cid() << " " << pgmeta_oid << dendl; return (new FuturizedStoreLogReader{ - store, ch, info, log, missing, pgmeta_oid, dpp})->start(); + store, ch, info, log, log_keys_debug, + missing, pgmeta_oid, dpp})->start(); } #endif