summaryrefslogtreecommitdiff
path: root/src/mongo/s/query/async_results_merger.cpp
diff options
context:
space:
mode:
authorRishab Joshi <rishab.joshi@mongodb.com>2021-04-26 14:24:23 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-05-09 11:06:41 +0000
commitca1a1e10e25f6e824e23317606da304c185bf259 (patch)
tree17c4cbee26dd1ffd006c922a2509828e57aab8c6 /src/mongo/s/query/async_results_merger.cpp
parent6ed5810685550369429efae6a175b163e8a111a5 (diff)
downloadmongo-ca1a1e10e25f6e824e23317606da304c185bf259.tar.gz
SERVER-55491: Make DocumentSourceUpdateOnAddShards as the first class member of the pipeline
Diffstat (limited to 'src/mongo/s/query/async_results_merger.cpp')
-rw-r--r--src/mongo/s/query/async_results_merger.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mongo/s/query/async_results_merger.cpp b/src/mongo/s/query/async_results_merger.cpp
index 111fde047f1..5ac4777ad48 100644
--- a/src/mongo/s/query/async_results_merger.cpp
+++ b/src/mongo/s/query/async_results_merger.cpp
@@ -128,6 +128,8 @@ AsyncResultsMerger::AsyncResultsMerger(OperationContext* opCtx,
tassert(
5493704, "Found invalidated cursor on the first batch", !_remotes.back().invalidated);
+ _remotes.back().shardId = remote.getShardId().toString();
+
// We don't check the return value of _addBatchToBuffer here; if there was an error,
// it will be stored in the remote and the first call to ready() will return true.
_addBatchToBuffer(WithLock::withoutLock(), remoteIndex, remote.getCursorResponse());