diff options
author | Andy Schwerin <schwerin@mongodb.com> | 2015-05-22 13:24:29 -0400 |
---|---|---|
committer | Andy Schwerin <schwerin@mongodb.com> | 2015-05-29 10:27:55 -0400 |
commit | 5c2d133871b2ad2adf6c617364d036ca25261f2d (patch) | |
tree | e3e28fa7bd0e56fa95802bb5770c9bbd4bee6da3 /src/mongo/db/service_context_d.h | |
parent | 1f4188fbdc733aa1cb08403d75f13a04d2279817 (diff) | |
download | mongo-5c2d133871b2ad2adf6c617364d036ca25261f2d.tar.gz |
SERVER-18277 Clarify locking of Client when accessing its stored OperationContext.
As a side-effect, clean up operation killing in ServiceContextMongoD.
Diffstat (limited to 'src/mongo/db/service_context_d.h')
-rw-r--r-- | src/mongo/db/service_context_d.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/mongo/db/service_context_d.h b/src/mongo/db/service_context_d.h index 9437d37aa07..1d707f33d63 100644 --- a/src/mongo/db/service_context_d.h +++ b/src/mongo/db/service_context_d.h @@ -80,8 +80,24 @@ namespace mongo { private: + /** + * 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); + bool _globalKill; // protected by parent class's _mutex |