]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/PGLog: populate log_keys_debug from read_old_log()
authorSage Weil <sage@inktank.com>
Sat, 29 Jun 2013 05:03:21 +0000 (22:03 -0700)
committerSage Weil <sage@inktank.com>
Mon, 1 Jul 2013 20:42:25 +0000 (13:42 -0700)
Fixes: #5470
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
src/osd/PGLog.cc
src/osd/PGLog.h

index 0ee926990185832130798ab0ff3e18ab02ccc7fb..f1896f7c6d2b16af82c786eda1de1443272fc050 100644 (file)
@@ -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<eversion_t, hobject_t> &divergent_priors,
-  IndexedLog &log,
-  pg_missing_t &missing, ostringstream &oss)
+                        const pg_info_t &info, map<eversion_t, hobject_t> &divergent_priors,
+                        IndexedLog &log,
+                        pg_missing_t &missing, ostringstream &oss,
+                        set<string> *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?
index d6e566a8eebb78f2c76a33c6bc1c59ff805e534e..6831775033221949353c271cfbcdd934c8794372 100644 (file)
@@ -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<eversion_t, hobject_t> &divergent_priors,
-    IndexedLog &log,
-    pg_missing_t &missing, ostringstream &oss);
+                          const pg_info_t &info, map<eversion_t, hobject_t> &divergent_priors,
+                          IndexedLog &log,
+                          pg_missing_t &missing, ostringstream &oss,
+                          set<string> *log_keys_debug);
 };
   
 #endif // CEPH_PG_LOG_H