]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
PG: call choose_acting when there are async_recovery_targets
authorNeha Ojha <nojha@redhat.com>
Fri, 19 Jan 2018 18:39:37 +0000 (10:39 -0800)
committerNeha Ojha <nojha@redhat.com>
Wed, 14 Mar 2018 22:56:05 +0000 (15:56 -0700)
Signed-off-by: Neha Ojha <nojha@redhat.com>
src/osd/PG.cc

index 337063ddebbfd3749e158ea1c8417b69cb86ccb5..3c7f7a9fc2e56d63ee6c0aa9dcf210d2d41f98ae 100644 (file)
@@ -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());
 }