Otherwise the log_oid will be non-empty and the next
boot will cause us to try to upgrade again.
Fixes: #6057
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
(cherry picked from commit
1f851cb2489a95526de932ec6734ebf413e43490)
/* We don't want to leave the old format around in case the next log
* write happens to be an append_log()
*/
+ pg_log.mark_log_for_rewrite();
ObjectStore::Transaction t;
+ t.remove(coll_t(), log_oid); // remove old version
pg_log.write_log(t, log_oid);
int r = osd->store->apply_transaction(t);
assert(!r);
divergent_priors.insert(make_pair(version, obj));
dirty_divergent_priors = true;
}
+public:
+ void mark_log_for_rewrite() {
+ mark_dirty_to(eversion_t::max());
+ mark_dirty_from(eversion_t());
+ touched_log = false;
+ }
+protected:
/// DEBUG
set<string> log_keys_debug;