diff options
Diffstat (limited to 'src/mongo/s/query/async_results_merger.cpp')
| -rw-r--r-- | src/mongo/s/query/async_results_merger.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mongo/s/query/async_results_merger.cpp b/src/mongo/s/query/async_results_merger.cpp index 363e151fbfd..50fb6310888 100644 --- a/src/mongo/s/query/async_results_merger.cpp +++ b/src/mongo/s/query/async_results_merger.cpp @@ -846,7 +846,8 @@ void AsyncResultsMerger::_scheduleKillCursors(WithLock, OperationContext* opCtx) invariant(_killCompleteInfo); for (const auto& remote : _remotes) { - if (remote.status.isOK() && remote.cursorId && !remote.exhausted()) { + if ((remote.status.isOK() || remote.status == ErrorCodes::MaxTimeMSExpired) && + remote.cursorId && !remote.exhausted()) { BSONObj cmdObj = KillCursorsCommandRequest(_params.getNss(), {remote.cursorId}).toBSON(BSONObj{}); |
