diff options
author | Sergi Mateo Bellido <sergi.mateo-bellido@mongodb.com> | 2021-07-22 15:51:24 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-07-23 11:10:02 +0000 |
commit | 186c59cdf182e3d26c3443e6e2a0a17197aa8602 (patch) | |
tree | 61cd8ab5ea5d7c7debeb3036525bd89b485dcbce /src/mongo/db/s/shard_metadata_util.cpp | |
parent | 7a8df38d284e16a60884569a90ddfa07586d9ec0 (diff) | |
download | mongo-186c59cdf182e3d26c3443e6e2a0a17197aa8602.tar.gz |
SERVER-58792 Disable the UUID-based logic that handles config.cache.chunks.* collections on the ShardServerCatalogCacheLoader
Diffstat (limited to 'src/mongo/db/s/shard_metadata_util.cpp')
-rw-r--r-- | src/mongo/db/s/shard_metadata_util.cpp | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/mongo/db/s/shard_metadata_util.cpp b/src/mongo/db/s/shard_metadata_util.cpp index 38315ea0d1c..07bcb7c22bd 100644 --- a/src/mongo/db/s/shard_metadata_util.cpp +++ b/src/mongo/db/s/shard_metadata_util.cpp @@ -282,9 +282,7 @@ StatusWith<std::vector<ChunkType>> readShardChunks(OperationContext* opCtx, boost::optional<long long> limit, const OID& epoch, const boost::optional<Timestamp>& timestamp) { - const NamespaceString chunksNss{ - ChunkType::ShardNSPrefix + - (!nss.isTemporaryReshardingCollection() && uuid ? uuid->toString() : nss.ns())}; + const NamespaceString chunksNss{ChunkType::ShardNSPrefix + nss.ns()}; try { DBDirectClient client(opCtx); @@ -324,9 +322,7 @@ Status updateShardChunks(OperationContext* opCtx, const OID& currEpoch) { invariant(!chunks.empty()); - const NamespaceString chunksNss{ - ChunkType::ShardNSPrefix + - (!nss.isTemporaryReshardingCollection() && uuid ? uuid->toString() : nss.ns())}; + const NamespaceString chunksNss{ChunkType::ShardNSPrefix + nss.ns()}; try { DBDirectClient client(opCtx); @@ -457,12 +453,11 @@ Status dropChunksAndDeleteCollectionsEntry(OperationContext* opCtx, const Namesp void dropChunks(OperationContext* opCtx, const NamespaceString& nss, const boost::optional<UUID>& uuid) { - const auto chunksNs = ChunkType::ShardNSPrefix + - (!nss.isTemporaryReshardingCollection() && uuid ? uuid->toString() : nss.ns()); + const NamespaceString chunksNss{ChunkType::ShardNSPrefix + nss.ns()}; DBDirectClient client(opCtx); BSONObj result; - if (!client.dropCollection(chunksNs, kLocalWriteConcern, &result)) { + if (!client.dropCollection(chunksNss.ns(), kLocalWriteConcern, &result)) { auto status = getStatusFromCommandResult(result); if (status != ErrorCodes::NamespaceNotFound) { uassertStatusOK(status); @@ -472,7 +467,7 @@ void dropChunks(OperationContext* opCtx, LOGV2_DEBUG(3463201, 1, "Dropped chunks cache", - "chunksNamespace"_attr = chunksNs, + "chunksNamespace"_attr = chunksNss, "collectionNamespace"_attr = nss, "error"_attr = getStatusFromCommandResult(result)); } |