summaryrefslogtreecommitdiff
path: root/src/mongo/db/index_builds_coordinator_mongod.cpp
diff options
context:
space:
mode:
authorAllison Easton <allison.easton@mongodb.com>2022-07-29 10:34:03 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-07-29 11:43:25 +0000
commit87df071285348663b750172dc6979f4cb28b5508 (patch)
tree1851129a78484d0b545b2bc86c626e19b9701331 /src/mongo/db/index_builds_coordinator_mongod.cpp
parentfc07225f8eb33456bbb67842db7d7112a0ee683b (diff)
downloadmongo-87df071285348663b750172dc6979f4cb28b5508.tar.gz
SERVER-67400 Create ShardVersion type
Diffstat (limited to 'src/mongo/db/index_builds_coordinator_mongod.cpp')
-rw-r--r--src/mongo/db/index_builds_coordinator_mongod.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mongo/db/index_builds_coordinator_mongod.cpp b/src/mongo/db/index_builds_coordinator_mongod.cpp
index 8f54e8fd9be..12d4f6693c8 100644
--- a/src/mongo/db/index_builds_coordinator_mongod.cpp
+++ b/src/mongo/db/index_builds_coordinator_mongod.cpp
@@ -374,7 +374,9 @@ IndexBuildsCoordinatorMongod::_startIndexBuild(OperationContext* opCtx,
std::move(impersonatedClientAttrs.roleNames));
}
- ScopedSetShardRole scopedSetShardRole(opCtx.get(), nss, shardVersion, dbVersion);
+ boost::optional<ChunkVersion> chunkVersion =
+ shardVersion ? boost::make_optional((ChunkVersion)*shardVersion) : boost::none;
+ ScopedSetShardRole scopedSetShardRole(opCtx.get(), nss, chunkVersion, dbVersion);
{
stdx::unique_lock<Client> lk(*opCtx->getClient());