PG: reset async_recovery_targets after recovery

Signed-off-by: Neha Ojha <nojha@redhat.com>
This commit is contained in:
Neha Ojha 2018-01-21 12:50:51 -08:00
parent 13d7093ec0
commit 853655a559
2 changed files with 4 additions and 2 deletions

View File

@ -1706,8 +1706,9 @@ bool PG::choose_acting(pg_shard_t &auth_log_shard_id,
// Caller is GetInfo
backfill_targets = want_backfill;
}
assert(async_recovery_targets.empty() || async_recovery_targets == want_async_recovery);
if (async_recovery_targets.empty()) {
// Adding !needs_recovery() to let the async_recovery_targets reset after recovery is complete
assert(async_recovery_targets.empty() || async_recovery_targets == want_async_recovery || !needs_recovery());
if (async_recovery_targets.empty() || !needs_recovery()) {
async_recovery_targets = want_async_recovery;
}
// Will not change if already set because up would have had to change

View File

@ -1407,6 +1407,7 @@ public:
}
} else {
ldpp_dout(dpp, 15) << "read_log_and_missing missing " << *i << dendl;
ldpp_dout(dpp, 15) << " missing set " << missing.get_items() << dendl;
if (debug_verify_stored_missing) {
auto miter = missing.get_items().find(i->soid);
if (i->is_delete()) {