PGLog: fix clear() to avoid the IndexLog::zero() asserts

Introduced in:
  c5b8d8105d
  ac11ca40b4
Signed-off-by: Samuel Just <sam.just@inktank.com>
This commit is contained in:
Samuel Just 2014-06-30 13:40:07 -07:00
parent c5b8d8105d
commit 959f2b2591
2 changed files with 6 additions and 1 deletions

View File

@ -136,7 +136,7 @@ void PGLog::reset_backfill()
void PGLog::clear() {
divergent_priors.clear();
missing.clear();
log.zero();
log.clear();
log_keys_debug.clear();
undirty();
}

View File

@ -109,6 +109,11 @@ struct PGLog {
rollback_info_trimmed_to_riter = log.rbegin();
reset_recovery_pointers();
}
void clear() {
rollback_info_trimmed_to = head;
rollback_info_trimmed_to_riter = log.rbegin();
zero();
}
void reset_recovery_pointers() {
complete_to = log.end();
last_requested = 0;