summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenety Goh <benety@mongodb.com>2021-07-19 16:32:42 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-10-01 09:19:26 +0000
commit2fd7e5d8f09ffdc22ebbd229cf40b1c6dda1c8fc (patch)
tree5961c0c4ef988dc51ffd3412885a55611d87dc5e
parent70267d23ea889dcb8a8b4cd89e23a831b824faa9 (diff)
downloadmongo-2fd7e5d8f09ffdc22ebbd229cf40b1c6dda1c8fc.tar.gz
SERVER-58385 add collection UUID to MultikeyPathInfo
(cherry picked from commit 2bb9844342e8c4c3201cdcbb8e84cc0618505ea0)
-rw-r--r--src/mongo/db/catalog/index_catalog_entry_impl.cpp8
-rw-r--r--src/mongo/db/multi_key_path_tracker.h2
2 files changed, 8 insertions, 2 deletions
diff --git a/src/mongo/db/catalog/index_catalog_entry_impl.cpp b/src/mongo/db/catalog/index_catalog_entry_impl.cpp
index 256954bd154..15a3252eeae 100644
--- a/src/mongo/db/catalog/index_catalog_entry_impl.cpp
+++ b/src/mongo/db/catalog/index_catalog_entry_impl.cpp
@@ -243,8 +243,12 @@ void IndexCatalogEntryImpl::setMultikey(OperationContext* opCtx,
// it multikey, that write will be marked as "isTrackingMultikeyPathInfo" on the applier's
// OperationContext and we can safely defer that write to the end of the batch.
if (MultikeyPathTracker::get(opCtx).isTrackingMultikeyPathInfo()) {
- MultikeyPathTracker::get(opCtx).addMultikeyPathInfo(
- {ns(), _descriptor->indexName(), multikeyMetadataKeys, std::move(paths)});
+ auto collection = _descriptor->getCollection();
+ MultikeyPathTracker::get(opCtx).addMultikeyPathInfo({collection->ns(),
+ collection->uuid(),
+ _descriptor->indexName(),
+ multikeyMetadataKeys,
+ std::move(paths)});
return;
}
diff --git a/src/mongo/db/multi_key_path_tracker.h b/src/mongo/db/multi_key_path_tracker.h
index f6a56546ae6..dc91a47c75f 100644
--- a/src/mongo/db/multi_key_path_tracker.h
+++ b/src/mongo/db/multi_key_path_tracker.h
@@ -36,11 +36,13 @@
#include "mongo/db/index/multikey_paths.h"
#include "mongo/db/operation_context.h"
#include "mongo/db/storage/key_string.h"
+#include "mongo/util/uuid.h"
namespace mongo {
struct MultikeyPathInfo {
NamespaceString nss;
+ UUID collectionUUID;
std::string indexName;
KeyStringSet multikeyMetadataKeys;
MultikeyPaths multikeyPaths;