summaryrefslogtreecommitdiff
path: root/src/mongo/s/catalog_cache.cpp
diff options
context:
space:
mode:
authorEric Cox <eric.cox@mongodb.com>2021-05-06 15:25:48 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-05-07 21:53:09 +0000
commit32fe49396dec58836033bca67ad1360b1a80f03c (patch)
tree48237434d1dfe52669de8128d7b7865f5fe2c650 /src/mongo/s/catalog_cache.cpp
parent1cd6cca8b23f386d7bd81915d4f510a29810ed3d (diff)
downloadmongo-32fe49396dec58836033bca67ad1360b1a80f03c.tar.gz
SERVER-54507 Can't execute merge if sharding catalog cache is empty
Diffstat (limited to 'src/mongo/s/catalog_cache.cpp')
-rw-r--r--src/mongo/s/catalog_cache.cpp28
1 files changed, 0 insertions, 28 deletions
diff --git a/src/mongo/s/catalog_cache.cpp b/src/mongo/s/catalog_cache.cpp
index 031ff69f7b6..572f72a0bd5 100644
--- a/src/mongo/s/catalog_cache.cpp
+++ b/src/mongo/s/catalog_cache.cpp
@@ -349,34 +349,6 @@ void CatalogCache::invalidateShardOrEntireCollectionEntryForShardedCollection(
}
}
-void CatalogCache::checkEpochOrThrow(const NamespaceString& nss,
- const ChunkVersion& targetCollectionVersion,
- const ShardId& shardId) {
- uassert(StaleConfigInfo(nss, targetCollectionVersion, boost::none, shardId),
- str::stream() << "could not act as router for " << nss.ns()
- << ", no entry for database " << nss.db(),
- _databaseCache.peekLatestCached(nss.db()));
-
- auto collectionValueHandle = _collectionCache.peekLatestCached(nss);
- uassert(StaleConfigInfo(nss, targetCollectionVersion, boost::none, shardId),
- str::stream() << "could not act as router for " << nss.ns()
- << ", no entry for collection.",
- collectionValueHandle);
-
- uassert(StaleConfigInfo(nss, targetCollectionVersion, boost::none, shardId),
- str::stream() << "could not act as router for " << nss.ns() << ", wanted "
- << targetCollectionVersion.toString()
- << ", but found the collection was unsharded",
- collectionValueHandle->optRt);
-
- auto foundVersion = collectionValueHandle->optRt->getVersion();
- uassert(StaleConfigInfo(nss, targetCollectionVersion, foundVersion, shardId),
- str::stream() << "could not act as router for " << nss.ns() << ", wanted "
- << targetCollectionVersion.toString() << ", but found "
- << foundVersion.toString(),
- foundVersion.epoch() == targetCollectionVersion.epoch());
-}
-
void CatalogCache::invalidateEntriesThatReferenceShard(const ShardId& shardId) {
LOGV2_DEBUG(4997600,
1,