diff options
author | Eric Milkie <milkie@10gen.com> | 2014-09-02 09:53:17 -0400 |
---|---|---|
committer | Eric Milkie <milkie@10gen.com> | 2014-09-02 11:19:43 -0400 |
commit | da2b649e755ba903e8b38ffb9cf24f3769bcb319 (patch) | |
tree | e8da090f884e94c635c2ff3167bc0059e8517396 | |
parent | 2f8c54f26c50bb65a0361b9b858e800eab020de0 (diff) | |
download | mongo-da2b649e755ba903e8b38ffb9cf24f3769bcb319.tar.gz |
SERVER-15113 fix order of cancellation vs. signaling in elect_cmd_runner
-rw-r--r-- | src/mongo/db/repl/elect_cmd_runner.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mongo/db/repl/elect_cmd_runner.cpp b/src/mongo/db/repl/elect_cmd_runner.cpp index d4901a445ba..bda9e109ade 100644 --- a/src/mongo/db/repl/elect_cmd_runner.cpp +++ b/src/mongo/db/repl/elect_cmd_runner.cpp @@ -125,8 +125,6 @@ namespace repl { void ElectCmdRunner::_signalSufficientResponsesReceived(ReplicationExecutor* executor) { if (_sufficientResponsesReceived.isValid()) { - executor->signalEvent(_sufficientResponsesReceived); - _sufficientResponsesReceived = ReplicationExecutor::EventHandle(); // Cancel any remaining command callbacks. std::for_each(_responseCallbacks.begin(), @@ -134,6 +132,9 @@ namespace repl { stdx::bind(&ReplicationExecutor::cancel, executor, stdx::placeholders::_1)); + + executor->signalEvent(_sufficientResponsesReceived); + _sufficientResponsesReceived = ReplicationExecutor::EventHandle(); } } |