summaryrefslogtreecommitdiff
path: root/src/mongo/db/pipeline/document_source_change_stream_add_pre_image.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/pipeline/document_source_change_stream_add_pre_image.cpp')
-rw-r--r--src/mongo/db/pipeline/document_source_change_stream_add_pre_image.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mongo/db/pipeline/document_source_change_stream_add_pre_image.cpp b/src/mongo/db/pipeline/document_source_change_stream_add_pre_image.cpp
index 583e3198a42..78d7e9f19cf 100644
--- a/src/mongo/db/pipeline/document_source_change_stream_add_pre_image.cpp
+++ b/src/mongo/db/pipeline/document_source_change_stream_add_pre_image.cpp
@@ -120,9 +120,11 @@ DocumentSource::GetNextResult DocumentSourceChangeStreamAddPreImage::doGetNext()
boost::optional<Document> DocumentSourceChangeStreamAddPreImage::lookupPreImage(
boost::intrusive_ptr<ExpressionContext> pExpCtx, const Document& preImageId) {
// Look up the pre-image document on the local node by id.
+ // TODO SERVER-66642 Consider using internal test-tenant id if applicable.
+ const auto tenantId = pExpCtx->ns.tenantId();
auto lookedUpDoc = pExpCtx->mongoProcessInterface->lookupSingleDocumentLocally(
pExpCtx,
- NamespaceString::kChangeStreamPreImagesNamespace,
+ NamespaceString::makePreImageCollectionNSS(tenantId),
Document{{ChangeStreamPreImage::kIdFieldName, preImageId}});
// Return boost::none to signify that we failed to find the pre-image.