summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Just <sam.just@inktank.com>2012-12-14 12:46:43 -0800
committerSamuel Just <sam.just@inktank.com>2012-12-14 13:38:51 -0800
commit6ab7db6717ebb9197203191124d1b4553702c6ba (patch)
tree03fefac360ed3c4c4465a5179d9e7dfe0761c4ea
parent7e1335691d83774377df8198bb09e3ecb4528966 (diff)
downloadceph-6ab7db6717ebb9197203191124d1b4553702c6ba.tar.gz
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 <sam.just@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com>
-rw-r--r--src/osd/ReplicatedPG.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc
index e0bcb5046d3..675973e8f07 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;