From e1a9e18b38a6f159fd96139652455230adc9d614 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 5 Mar 2012 14:20:48 -0800 Subject: [PATCH] osd: warn if recovery still has missing at end We shouldn't get to this point. If we do, recover_primary didn't do what it needed to. Dump the remaining missing set and hope we can debug. Signed-off-by: Sage Weil --- src/osd/ReplicatedPG.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index 2b177637dc0..9740f461ef0 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -5430,6 +5430,13 @@ int ReplicatedPG::start_recovery_ops(int max, RecoveryCtx *prctx) return started; } + if (missing.num_missing() > 0) { + // this shouldn't happen! + osd->clog.error() << info.pgid << " recovery ending with " << missing.num_missing() + << ": " << missing.missing << "\n"; + return started; + } + handle_recovery_complete(prctx); return 0;