summaryrefslogtreecommitdiff
path: root/src/mongo/db/operation_context.cpp
diff options
context:
space:
mode:
authorKaloian Manassiev <kaloian.manassiev@mongodb.com>2015-12-30 17:01:04 -0500
committerKaloian Manassiev <kaloian.manassiev@mongodb.com>2015-12-30 17:09:27 -0500
commit715e9e1cdc618dad480a7a1a73458daf6ea9ce0f (patch)
tree95ee80f3e51d3218647bc6fb013dec7f3f735297 /src/mongo/db/operation_context.cpp
parent5d2d6e209acd862324612c7f9c41d65940f8dcba (diff)
downloadmongo-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.cpp9
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