diff --git a/src/osd/PGLog.cc b/src/osd/PGLog.cc index 0ee92699018..f1896f7c6d2 100644 --- a/src/osd/PGLog.cc +++ b/src/osd/PGLog.cc @@ -636,7 +636,7 @@ bool PGLog::read_log(ObjectStore *store, coll_t coll, hobject_t log_oid, int r = store->stat(coll_t::META_COLL, log_oid, &st); assert(r == 0); if (st.st_size > 0) { - read_log_old(store, coll, log_oid, info, divergent_priors, log, missing, oss); + read_log_old(store, coll, log_oid, info, divergent_priors, log, missing, oss, log_keys_debug); rewrite_log = true; } else { log.tail = info.log_tail; @@ -728,9 +728,10 @@ bool PGLog::read_log(ObjectStore *store, coll_t coll, hobject_t log_oid, } void PGLog::read_log_old(ObjectStore *store, coll_t coll, hobject_t log_oid, - const pg_info_t &info, map &divergent_priors, - IndexedLog &log, - pg_missing_t &missing, ostringstream &oss) + const pg_info_t &info, map &divergent_priors, + IndexedLog &log, + pg_missing_t &missing, ostringstream &oss, + set *log_keys_debug) { // load bounds, based on old OndiskLog encoding. uint64_t ondisklog_tail = 0; @@ -854,6 +855,8 @@ void PGLog::read_log_old(ObjectStore *store, coll_t coll, hobject_t log_oid, e.offset = pos; uint64_t endpos = ondisklog_tail + p.get_off(); log.log.push_back(e); + if (log_keys_debug) + log_keys_debug->insert(e.get_key_name()); last = e.version; // [repair] at end of log? diff --git a/src/osd/PGLog.h b/src/osd/PGLog.h index d6e566a8eeb..68317750332 100644 --- a/src/osd/PGLog.h +++ b/src/osd/PGLog.h @@ -382,9 +382,10 @@ public: protected: static void read_log_old(ObjectStore *store, coll_t coll, hobject_t log_oid, - const pg_info_t &info, map &divergent_priors, - IndexedLog &log, - pg_missing_t &missing, ostringstream &oss); + const pg_info_t &info, map &divergent_priors, + IndexedLog &log, + pg_missing_t &missing, ostringstream &oss, + set *log_keys_debug); }; #endif // CEPH_PG_LOG_H