From 714254cb0522b194118eb854f90d4c3971e8c6b3 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 8 Oct 2012 17:14:22 -0700 Subject: [PATCH] mon: drop command replies on paxos reset If paxos resets, do not send the reply for the commit we were waiting for; let the command be reprocessed and re-proposed. Among other things, this could lead to nondeterministic results for 'ceph osd create '. Signed-off-by: Sage Weil --- src/mon/Monitor.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/mon/Monitor.h b/src/mon/Monitor.h index 2d7f8818c56d4..5592589e0abf9 100644 --- a/src/mon/Monitor.h +++ b/src/mon/Monitor.h @@ -43,6 +43,8 @@ #include "perfglue/heap_profiler.h" +#include "messages/MMonCommand.h" + #include @@ -369,7 +371,10 @@ public: C_Command(Monitor *_mm, MMonCommand *_m, int r, string s, bufferlist rd, version_t v) : mon(_mm), m(_m), rc(r), rs(s), rdata(rd), version(v){} void finish(int r) { - mon->reply_command(m, rc, rs, rdata, version); + if (r >= 0) + mon->reply_command(m, rc, rs, rdata, version); + else + mon->_ms_dispatch(m); } }; -- 2.39.5