diff options
author | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2015-12-30 17:01:04 -0500 |
---|---|---|
committer | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2015-12-30 17:09:27 -0500 |
commit | 715e9e1cdc618dad480a7a1a73458daf6ea9ce0f (patch) | |
tree | 95ee80f3e51d3218647bc6fb013dec7f3f735297 /src/mongo/db/operation_context.cpp | |
parent | 5d2d6e209acd862324612c7f9c41d65940f8dcba (diff) | |
download | mongo-715e9e1cdc618dad480a7a1a73458daf6ea9ce0f.tar.gz |
Revert "SERVER-22027 Sharding should not retry killed operations"
This reverts commit 5d2d6e209acd862324612c7f9c41d65940f8dcba.
Diffstat (limited to 'src/mongo/db/operation_context.cpp')
-rw-r--r-- | src/mongo/db/operation_context.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/mongo/db/operation_context.cpp b/src/mongo/db/operation_context.cpp index 1434ee5ddc7..1b79dadcb50 100644 --- a/src/mongo/db/operation_context.cpp +++ b/src/mongo/db/operation_context.cpp @@ -46,13 +46,12 @@ Client* OperationContext::getClient() const { return _client; } -void OperationContext::markKilled(ErrorCodes::Error killCode) { - invariant(killCode != ErrorCodes::OK); - _killCode.compareAndSwap(ErrorCodes::OK, killCode); +void OperationContext::markKilled() { + _killPending.store(1); } -ErrorCodes::Error OperationContext::getKillStatus() const { - return _killCode.loadRelaxed(); +bool OperationContext::isKillPending() const { + return _killPending.loadRelaxed(); } } // namespace mongo |