diff options
author | Steve Tarzia <steve.tarzia@mongodb.com> | 2022-11-16 15:41:06 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-11-16 17:28:42 +0000 |
commit | 29296c1ed9d000f761d908e1c32363acb0802568 (patch) | |
tree | 9df2989f545f7726fd2713446bca5eab8324b9ea /src/mongo/s/query/cluster_client_cursor_impl.cpp | |
parent | 931838789d56be706032fa6d3b6062aa38c7ee83 (diff) | |
download | mongo-29296c1ed9d000f761d908e1c32363acb0802568.tar.gz |
SERVER-71372 fix getMore of partial results from find on sharded cluster
Diffstat (limited to 'src/mongo/s/query/cluster_client_cursor_impl.cpp')
-rw-r--r-- | src/mongo/s/query/cluster_client_cursor_impl.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mongo/s/query/cluster_client_cursor_impl.cpp b/src/mongo/s/query/cluster_client_cursor_impl.cpp index 444b0615d99..4f2a333c3be 100644 --- a/src/mongo/s/query/cluster_client_cursor_impl.cpp +++ b/src/mongo/s/query/cluster_client_cursor_impl.cpp @@ -99,7 +99,6 @@ ClusterClientCursorImpl::~ClusterClientCursorImpl() { } StatusWith<ClusterQueryResult> ClusterClientCursorImpl::next() { - invariant(_opCtx); const auto interruptStatus = _opCtx->checkForInterruptNoAssert(); if (!interruptStatus.isOK()) { @@ -119,6 +118,8 @@ StatusWith<ClusterQueryResult> ClusterClientCursorImpl::next() { if (next.isOK() && !next.getValue().isEOF()) { ++_numReturnedSoFar; } + // Record if we just got a MaxTimeMSExpired error. + _maxTimeMSExpired |= (next.getStatus().code() == ErrorCodes::MaxTimeMSExpired); return next; } |