From 79f310ac4d3d2c520e7665be057f2143113537a9 Mon Sep 17 00:00:00 2001 From: Samuel Just Date: Mon, 17 Aug 2015 11:21:27 -0700 Subject: [PATCH] ReplicatedPG: treat object as degraded until on_global_recover Otherwise, an op might slip by between on_local_recover and on_global_recover. Signed-off-by: Samuel Just --- src/osd/ReplicatedPG.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index 48f4277dbda..98078f85d1f 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -413,6 +413,12 @@ void ReplicatedPG::wait_for_all_missing(OpRequestRef op) bool ReplicatedPG::is_degraded_or_backfilling_object(const hobject_t& soid) { + /* The conditions below may clear (on_local_recover, before we queue + * the tranasction) before we actually requeue the degraded waiters + * in on_global_recover after the transaction completes. + */ + if (waiting_for_degraded_object.count(soid)) + return true; if (pg_log.get_missing().missing.count(soid)) return true; assert(!actingbackfill.empty());