From: Greg Farnum Date: Fri, 11 Mar 2016 01:24:04 +0000 (-0800) Subject: ReplicatedPG: be more careful about calling publish_stats_to_osd() correctly X-Git-Tag: v10.1.0~54^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d9af48abb7d96d9d140d389bed52788473a760df;p=ceph.git ReplicatedPG: be more careful about calling publish_stats_to_osd() correctly We had moved the call out of eval_repop into a lambda, but that left out a few other code paths and is fragile. So just call it unconditionally in eval_repop() when we're done with the repop instead. Fixes: #14962 Signed-off-by: Greg Farnum --- diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index a403e9d6f961..b72c1d43a252 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -3010,8 +3010,6 @@ void ReplicatedPG::execute_ctx(OpContext *ctx) log_op_stats( ctx); - publish_stats_to_osd(); - if (m && m->wants_ondisk() && !ctx->sent_disk) { // send commit. MOSDOpReply *reply = ctx->reply; @@ -8355,6 +8353,7 @@ void ReplicatedPG::eval_repop(RepGather *repop) if (repop->all_applied && repop->all_committed) { repop->rep_done = true; + publish_stats_to_osd(); calc_min_last_complete_ondisk(); for (auto p = repop->on_success.begin();