diff options
author | Ian Boros <puppyofkosh@gmail.com> | 2019-07-02 14:29:56 -0400 |
---|---|---|
committer | Ian Boros <ian.boros@mongodb.com> | 2019-07-26 11:21:22 -0400 |
commit | 7a4fce6cfde41529c447417318e9c79ae42e92f0 (patch) | |
tree | 09736fa5113dc1a20781a8522625af48685cf8a1 /src | |
parent | eaa3578e9f2602e82ac23599bacf6bba6800a26e (diff) | |
download | mongo-7a4fce6cfde41529c447417318e9c79ae42e92f0.tar.gz |
SERVER-40110 don't call OpContext::checkForInterrupt() off-thread
Diffstat (limited to 'src')
-rw-r--r-- | src/mongo/s/query/cluster_cursor_manager.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/mongo/s/query/cluster_cursor_manager.h b/src/mongo/s/query/cluster_cursor_manager.h index 0fcf0a51532..353727349b7 100644 --- a/src/mongo/s/query/cluster_cursor_manager.h +++ b/src/mongo/s/query/cluster_cursor_manager.h @@ -586,8 +586,13 @@ private: bool isKillPending() const { // A cursor is kill pending if it's checked out by an OperationContext that was // interrupted. - return _operationUsingCursor && - !_operationUsingCursor->checkForInterruptNoAssert().isOK(); + if (!_operationUsingCursor) { + return false; + } + + // Must hold the Client lock when calling isKillPending(). + stdx::unique_lock<Client> lk(*_operationUsingCursor->getClient()); + return _operationUsingCursor->isKillPending(); } CursorType getCursorType() const { |