diff options
author | Tommaso Tocci <tommaso.tocci@mongodb.com> | 2020-02-05 18:56:33 +0100 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-02-14 12:12:24 +0000 |
commit | c25f0bc16a1f515f20972f30abf6bd569235a00f (patch) | |
tree | d96416a544638513890b1900ea7c05dedcd75b1b /src/mongo/db/repl | |
parent | b6ef7212c4f1c263e9d997b606c9127601e023e3 (diff) | |
download | mongo-c25f0bc16a1f515f20972f30abf6bd569235a00f.tar.gz |
SERVER-44771 Introduce 2nd CatalogCache for filtering only
Only on ShardServer (not ReadOnly) use a second catalog cache for
filtering only in order to allow operations in transactions to safely
consult the CatalogCache.
Diffstat (limited to 'src/mongo/db/repl')
-rw-r--r-- | src/mongo/db/repl/replication_coordinator_external_state_impl.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mongo/db/repl/replication_coordinator_external_state_impl.cpp b/src/mongo/db/repl/replication_coordinator_external_state_impl.cpp index 29dfa758378..0a0de0577e8 100644 --- a/src/mongo/db/repl/replication_coordinator_external_state_impl.cpp +++ b/src/mongo/db/repl/replication_coordinator_external_state_impl.cpp @@ -82,6 +82,7 @@ #include "mongo/db/s/migration_util.h" #include "mongo/db/s/periodic_balancer_config_refresher.h" #include "mongo/db/s/periodic_sharded_index_consistency_checker.h" +#include "mongo/db/s/shard_filtering_metadata_refresh.h" #include "mongo/db/s/sharding_initialization_mongod.h" #include "mongo/db/s/sharding_state_recovery.h" #include "mongo/db/s/transaction_coordinator_service.h" @@ -715,7 +716,7 @@ void ReplicationCoordinatorExternalStateImpl::shardingOnStepDownHook() { TransactionCoordinatorService::get(_service)->onStepDown(); } else if (ShardingState::get(_service)->enabled()) { ChunkSplitter::get(_service).onStepDown(); - CatalogCacheLoader::get(_service).onStepDown(); + getCatalogCacheLoaderForFiltering(_service).onStepDown(); PeriodicBalancerConfigRefresher::get(_service).onStepDown(); TransactionCoordinatorService::get(_service)->onStepDown(); } @@ -818,7 +819,7 @@ void ReplicationCoordinatorExternalStateImpl::_shardingOnTransitionToPrimaryHook ShardingInitializationMongoD::get(opCtx)->updateShardIdentityConfigString(opCtx, configsvrConnStr); - CatalogCacheLoader::get(_service).onStepUp(); + getCatalogCacheLoaderForFiltering(_service).onStepUp(); ChunkSplitter::get(_service).onStepUp(); PeriodicBalancerConfigRefresher::get(_service).onStepUp(_service); TransactionCoordinatorService::get(_service)->onStepUp(opCtx); |