]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
PG::init: clear rollback info for backfill as well 2436/head
authorSamuel Just <sam.just@inktank.com>
Fri, 29 Aug 2014 21:04:04 +0000 (14:04 -0700)
committerSamuel Just <sam.just@inktank.com>
Fri, 29 Aug 2014 21:04:04 +0000 (14:04 -0700)
Otherwise, we won't remove the old rollback objects from a resurrected pg.  In
rare cases, this can cause us to get an EEXIST if we happen to reuse the same
rename id on the same object in a subsequent interval.

Fixes: #9293
Related to: 8346e10755027e982f26bab4642334fd91cc31aa
Backport: firefly
Signed-off-by: Samuel Just <sam.just@inktank.com>
src/osd/PG.cc

index 72d349fca31a8995af385848ed8388c5af8e68c8..f558a00867d20832d643c99eaf5f003b543aa282 100644 (file)
@@ -2418,6 +2418,11 @@ void PG::init(
     dout(10) << __func__ << ": Setting backfill" << dendl;
     info.last_backfill = hobject_t();
     info.last_complete = info.last_update;
+
+    PGLogEntryHandler rollbacker;
+    pg_log_t empty;
+    pg_log.claim_log_and_clear_rollback_info(empty, &rollbacker);
+    rollbacker.apply(this, t);
     pg_log.mark_log_for_rewrite();
   }