From 6ab7db6717ebb9197203191124d1b4553702c6ba Mon Sep 17 00:00:00 2001 From: Samuel Just Date: Fri, 14 Dec 2012 12:46:43 -0800 Subject: [PATCH] ReplicatedPG: use default priority for Backfill messages Backfill messages modify the stats on the replica and therefore must be sent with the same priority as sub_op_modify to ensure ordering. Using recovery_op_priority caused the following sequence: 1) Primary(1) sends MOSDPGBackfill FINISH with updated stats (v1) 2) Primary(1) sends SubOp modify for new client op with stats (v2) 3) Replica(2) receives SubOp with stats (v2) 4) Replica(2) receives MOSDPGBackfill FINISH with stats (v1) 5) Replica(2) responds and Primary(1) resets pgtemp making Replica(2) Primary(2) 6) PG stats on Primary(2) several ops old. Signed-off-by: Samuel Just Reviewed-by: Sage Weil --- src/osd/ReplicatedPG.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index e0bcb5046d34..675973e8f073 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -6832,7 +6832,7 @@ int ReplicatedPG::recover_backfill(int max) MOSDPGBackfill *m = NULL; if (bound.is_max()) { m = new MOSDPGBackfill(MOSDPGBackfill::OP_BACKFILL_FINISH, e, e, info.pgid); - m->set_priority(g_conf->osd_recovery_op_priority); + // Use default priority here, must match sub_op priority /* pinfo.stats might be wrong if we did log-based recovery on the * backfilled portion in addition to continuing backfill. */ @@ -6840,7 +6840,7 @@ int ReplicatedPG::recover_backfill(int max) start_recovery_op(hobject_t::get_max()); } else { m = new MOSDPGBackfill(MOSDPGBackfill::OP_BACKFILL_PROGRESS, e, e, info.pgid); - m->set_priority(g_conf->osd_recovery_op_priority); + // Use default priority here, must match sub_op priority } m->last_backfill = bound; m->stats = pinfo.stats.stats; -- 2.47.3