diff options
Diffstat (limited to 'src/mongo/embedded/index_builds_coordinator_embedded.cpp')
-rw-r--r-- | src/mongo/embedded/index_builds_coordinator_embedded.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/mongo/embedded/index_builds_coordinator_embedded.cpp b/src/mongo/embedded/index_builds_coordinator_embedded.cpp index 72437ac9f09..e27fe71c201 100644 --- a/src/mongo/embedded/index_builds_coordinator_embedded.cpp +++ b/src/mongo/embedded/index_builds_coordinator_embedded.cpp @@ -33,6 +33,7 @@ #include "mongo/embedded/index_builds_coordinator_embedded.h" +#include "mongo/db/catalog/uuid_catalog.h" #include "mongo/db/catalog_raii.h" #include "mongo/db/operation_context.h" #include "mongo/db/service_context.h" @@ -44,10 +45,10 @@ namespace mongo { void IndexBuildsCoordinatorEmbedded::shutdown() {} StatusWith<SharedSemiFuture<ReplIndexBuildState::IndexCatalogStats>> -IndexBuildsCoordinatorEmbedded::buildIndex(OperationContext* opCtx, - CollectionUUID collectionUUID, - const std::vector<BSONObj>& specs, - const UUID& buildUUID) { +IndexBuildsCoordinatorEmbedded::startIndexBuild(OperationContext* opCtx, + CollectionUUID collectionUUID, + const std::vector<BSONObj>& specs, + const UUID& buildUUID) { std::vector<std::string> indexNames; for (auto& spec : specs) { std::string name = spec.getStringField(IndexDescriptor::kIndexNameFieldName); @@ -60,8 +61,10 @@ IndexBuildsCoordinatorEmbedded::buildIndex(OperationContext* opCtx, indexNames.push_back(name); } + auto nss = UUIDCatalog::get(opCtx).lookupNSSByUUID(collectionUUID); + auto dbName = nss.db().toString(); auto replIndexBuildState = - std::make_shared<ReplIndexBuildState>(buildUUID, collectionUUID, indexNames, specs); + std::make_shared<ReplIndexBuildState>(buildUUID, collectionUUID, dbName, indexNames, specs); Status status = _registerIndexBuild(opCtx, replIndexBuildState); if (!status.isOK()) { |