summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands/list_indexes.cpp
diff options
context:
space:
mode:
authorDaniel Gottlieb <daniel.gottlieb@mongodb.com>2019-11-06 16:24:40 +0000
committerevergreen <evergreen@mongodb.com>2019-11-06 16:24:40 +0000
commit39c08aceaf7fa15a8e65cf80b09863b452425426 (patch)
tree7efc9eab66c71f8894c7ebf6dee8b0ee649dec18 /src/mongo/db/commands/list_indexes.cpp
parent0ff5e5e7cc09c31d3fe260cf6602f461e6e20bb6 (diff)
downloadmongo-39c08aceaf7fa15a8e65cf80b09863b452425426.tar.gz
SERVER-44276: Change storage engine catalog map to be keyed by RecordId instead of Namespace.
Diffstat (limited to 'src/mongo/db/commands/list_indexes.cpp')
-rw-r--r--src/mongo/db/commands/list_indexes.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/mongo/db/commands/list_indexes.cpp b/src/mongo/db/commands/list_indexes.cpp
index b7c26eb3309..858b22daba0 100644
--- a/src/mongo/db/commands/list_indexes.cpp
+++ b/src/mongo/db/commands/list_indexes.cpp
@@ -164,7 +164,7 @@ public:
vector<string> indexNames;
writeConflictRetry(opCtx, "listIndexes", nss.ns(), [&] {
indexNames.clear();
- durableCatalog->getAllIndexes(opCtx, nss, &indexNames);
+ durableCatalog->getAllIndexes(opCtx, collection->getCatalogId(), &indexNames);
});
auto ws = std::make_unique<WorkingSet>();
@@ -173,17 +173,20 @@ public:
for (size_t i = 0; i < indexNames.size(); i++) {
auto indexSpec = writeConflictRetry(opCtx, "listIndexes", nss.ns(), [&] {
if (includeBuildUUIDs &&
- !durableCatalog->isIndexReady(opCtx, nss, indexNames[i])) {
+ !durableCatalog->isIndexReady(
+ opCtx, collection->getCatalogId(), indexNames[i])) {
BSONObjBuilder builder;
builder.append("spec"_sd,
- durableCatalog->getIndexSpec(opCtx, nss, indexNames[i]));
+ durableCatalog->getIndexSpec(
+ opCtx, collection->getCatalogId(), indexNames[i]));
// TODO(SERVER-37980): Replace with index build UUID.
auto indexBuildUUID = UUID::gen();
indexBuildUUID.appendToBuilder(&builder, "buildUUID"_sd);
return builder.obj();
}
- return durableCatalog->getIndexSpec(opCtx, nss, indexNames[i]);
+ return durableCatalog->getIndexSpec(
+ opCtx, collection->getCatalogId(), indexNames[i]);
});
WorkingSetID id = ws->allocate();