diff options
author | Martin Neupauer <martin.neupauer@10gen.com> | 2018-03-26 19:30:26 -0400 |
---|---|---|
committer | Martin Neupauer <martin.neupauer@mongodb.com> | 2018-04-05 12:52:02 -0400 |
commit | a6d486b8a6e0c81771bd771cc0237236791d635d (patch) | |
tree | 61b49fae8cf316c033b2ac707202e50b281cc72a /src/mongo/db/s/set_shard_version_command.cpp | |
parent | 6fbc1bbfcd5ffcfb451c300a6ef523f19d5edb55 (diff) | |
download | mongo-a6d486b8a6e0c81771bd771cc0237236791d635d.tar.gz |
SERVER-33523 Add timestamp support to CollectionMetadata
Diffstat (limited to 'src/mongo/db/s/set_shard_version_command.cpp')
-rw-r--r-- | src/mongo/db/s/set_shard_version_command.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mongo/db/s/set_shard_version_command.cpp b/src/mongo/db/s/set_shard_version_command.cpp index 63818e7fe89..6dca94efffd 100644 --- a/src/mongo/db/s/set_shard_version_command.cpp +++ b/src/mongo/db/s/set_shard_version_command.cpp @@ -229,8 +229,8 @@ public: auto css = CollectionShardingState::get(opCtx, nss); const ChunkVersion collectionShardVersion = - (css->getMetadata() ? css->getMetadata()->getShardVersion() - : ChunkVersion::UNSHARDED()); + (css->getMetadata(opCtx) ? css->getMetadata(opCtx)->getShardVersion() + : ChunkVersion::UNSHARDED()); if (requestedVersion.isWriteCompatibleWith(collectionShardVersion)) { // MongoS and MongoD agree on what is the collection's shard version @@ -341,7 +341,7 @@ public: AutoGetCollection autoColl(opCtx, nss, MODE_IS); ChunkVersion currVersion = ChunkVersion::UNSHARDED(); - auto collMetadata = CollectionShardingState::get(opCtx, nss)->getMetadata(); + auto collMetadata = CollectionShardingState::get(opCtx, nss)->getMetadata(opCtx); if (collMetadata) { currVersion = collMetadata->getShardVersion(); } |