summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/osd/ReplicatedPG.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc
index 2456d176834..3cd5a7ef865 100644
--- a/src/osd/ReplicatedPG.cc
+++ b/src/osd/ReplicatedPG.cc
@@ -7293,6 +7293,13 @@ int ReplicatedPG::start_recovery_ops(
return started;
}
+ if (needs_recovery()) {
+ // this shouldn't happen!
+ // We already checked num_missing() so we must have missing replicas
+ osd->clog.error() << info.pgid << " recovery ending with missing replicas\n";
+ return started;
+ }
+
if (state_test(PG_STATE_RECOVERING)) {
state_clear(PG_STATE_RECOVERING);
if (needs_backfill()) {