summaryrefslogtreecommitdiff
path: root/src/mongo/db/s/config
diff options
context:
space:
mode:
authorJordi Serra Torrens <jordi.serra-torrens@mongodb.com>2021-02-24 08:53:55 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-03-15 12:11:20 +0000
commitd22d0058c4f02c7bcd7337af8b1058cac8e26e45 (patch)
treed0a338f144a375b536c0523591885d7bae4d6608 /src/mongo/db/s/config
parent0914e8c70f51c10f84cfb0568975e06153901e04 (diff)
downloadmongo-d22d0058c4f02c7bcd7337af8b1058cac8e26e45.tar.gz
SERVER-54874: Ensure reading consistent config.collections and config.chunks when refreshing the CatalogCache
(cherry picked from commit 538cb2ff982aab2a60c4f3ab53eb1ba6d1acfeb9)
Diffstat (limited to 'src/mongo/db/s/config')
-rw-r--r--src/mongo/db/s/config/config_server_test_fixture.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mongo/db/s/config/config_server_test_fixture.cpp b/src/mongo/db/s/config/config_server_test_fixture.cpp
index 228ac592d20..4ea409b1d0f 100644
--- a/src/mongo/db/s/config/config_server_test_fixture.cpp
+++ b/src/mongo/db/s/config/config_server_test_fixture.cpp
@@ -139,8 +139,9 @@ void ConfigServerTestFixture::_setUp(std::function<void()> onPreInitGlobalStateF
_addShardNetworkTestEnv =
std::make_unique<NetworkTestEnv>(_executorForAddShard, _mockNetworkForAddShard);
- CatalogCacheLoader::set(getServiceContext(),
- std::make_unique<ConfigServerCatalogCacheLoader>());
+ auto configServerCatalogCacheLoader = std::make_unique<ConfigServerCatalogCacheLoader>();
+ configServerCatalogCacheLoader->setAvoidSnapshotForRefresh_ForTest();
+ CatalogCacheLoader::set(getServiceContext(), std::move(configServerCatalogCacheLoader));
onPreInitGlobalStateFn();