diff options
author | Sage Weil <sage@inktank.com> | 2012-10-08 17:14:22 -0700 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2012-10-10 14:20:45 -0700 |
commit | 714254cb0522b194118eb854f90d4c3971e8c6b3 (patch) | |
tree | d4590f8c78a958547a6ac0749a0581f88232cbec /src/mon | |
parent | d9e981f4209da9a0e000d434e28686a133b25f11 (diff) | |
download | ceph-714254cb0522b194118eb854f90d4c3971e8c6b3.tar.gz |
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 <uuid>'.
Signed-off-by: Sage Weil <sage@inktank.com>
Diffstat (limited to 'src/mon')
-rw-r--r-- | src/mon/Monitor.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mon/Monitor.h b/src/mon/Monitor.h index 2d7f8818c56..5592589e0ab 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 <memory> @@ -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); } }; |