From 715e9e1cdc618dad480a7a1a73458daf6ea9ce0f Mon Sep 17 00:00:00 2001 From: Kaloian Manassiev Date: Wed, 30 Dec 2015 17:01:04 -0500 Subject: Revert "SERVER-22027 Sharding should not retry killed operations" This reverts commit 5d2d6e209acd862324612c7f9c41d65940f8dcba. --- src/mongo/db/service_context_d.h | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'src/mongo/db/service_context_d.h') diff --git a/src/mongo/db/service_context_d.h b/src/mongo/db/service_context_d.h index dc834197e9e..0c560ff17f4 100644 --- a/src/mongo/db/service_context_d.h +++ b/src/mongo/db/service_context_d.h @@ -67,7 +67,7 @@ public: bool killOperation(unsigned int opId) override; - void killAllUserOperations(const OperationContext* txn, ErrorCodes::Error killCode) override; + void killAllUserOperations(const OperationContext* txn) override; void registerKillOpListener(KillOpListenerInterface* listener) override; @@ -78,12 +78,23 @@ public: private: std::unique_ptr _newOpCtx(Client* client) override; + /** + * Kills the active operation on "client" if that operation is associated with operation id + * "opId". + * + * Returns true if an operation was killed. + * + * Must only be called by a thread owning both this service context's mutex and the + * client's. + */ + bool _killOperationsAssociatedWithClientAndOpId_inlock(Client* client, unsigned int opId); + /** * Kills the given operation. * * Caller must own the service context's _mutex. */ - void _killOperation_inlock(OperationContext* opCtx, ErrorCodes::Error killCode); + void _killOperation_inlock(OperationContext* opCtx); bool _globalKill; -- cgit v1.2.1