From 13d7093ec07449e84f5d6d53530c115b70f9890a Mon Sep 17 00:00:00 2001 From: Neha Ojha Date: Fri, 19 Jan 2018 10:39:37 -0800 Subject: [PATCH] PG: call choose_acting when there are async_recovery_targets Signed-off-by: Neha Ojha --- src/osd/PG.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 337063ddebb..3c7f7a9fc2e 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -7719,10 +7719,14 @@ PG::RecoveryState::Recovered::Recovered(my_context ctx) // adjust acting set? (e.g. because backfill completed...) bool history_les_bound = false; if (pg->acting != pg->up && !pg->choose_acting(auth_log_shard, - true, &history_les_bound)) + true, &history_les_bound)) { assert(pg->want_acting.size()); + } else if (!pg->async_recovery_targets.empty()) { + pg->choose_acting(auth_log_shard, true, &history_les_bound); + } - if (context< Active >().all_replicas_activated) + if (context< Active >().all_replicas_activated && + pg->async_recovery_targets.empty()) post_event(GoClean()); } -- 2.39.5