]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
PGLog::rewind_divergent_log: unindex only works from tail, index() instead
authorSamuel Just <sam.just@inktank.com>
Mon, 22 Jul 2013 20:46:10 +0000 (13:46 -0700)
committerSage Weil <sage@inktank.com>
Wed, 24 Jul 2013 23:20:37 +0000 (16:20 -0700)
Fixes: #5714
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 6957dbc75cc2577652b542aa3eae69f03060cb63)

The original patch covered the same code in PGLog.cc.

Conflicts:

src/osd/PGLog.cc
src/osd/PG.cc

src/osd/PG.cc

index 442795015f606f8c6d139bf5052f1e9d128bfa01..b547840a0f26339b156fd76b028abc831dc3387c 100644 (file)
@@ -560,7 +560,6 @@ void PG::rewind_divergent_log(ObjectStore::Transaction& t, eversion_t newhead)
     }
     assert(p->version > newhead);
     dout(10) << "rewind_divergent_log future divergent " << *p << dendl;
-    log.unindex(*p);
   }
 
   log.head = newhead;
@@ -568,6 +567,8 @@ void PG::rewind_divergent_log(ObjectStore::Transaction& t, eversion_t newhead)
   if (info.last_complete > newhead)
     info.last_complete = newhead;
 
+  log.index();
+
   for (list<pg_log_entry_t>::iterator d = divergent.begin(); d != divergent.end(); ++d)
     merge_old_entry(t, *d);