From 4b16e0d00a54e18f7b6bcb2a999ebee6c1e49ea5 Mon Sep 17 00:00:00 2001 From: Sergi Mateo Bellido Date: Thu, 22 Jul 2021 06:50:34 +0000 Subject: SERVER-58747 The ShardServerCatalogCacheLoader doesn't interrupt ongoing operations on step up (cherry picked from commit 7a8df38d284e16a60884569a90ddfa07586d9ec0) --- src/mongo/db/s/shard_server_catalog_cache_loader.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mongo/db/s/shard_server_catalog_cache_loader.cpp b/src/mongo/db/s/shard_server_catalog_cache_loader.cpp index e12d87e5a7b..d85d90d2fde 100644 --- a/src/mongo/db/s/shard_server_catalog_cache_loader.cpp +++ b/src/mongo/db/s/shard_server_catalog_cache_loader.cpp @@ -370,6 +370,7 @@ void ShardServerCatalogCacheLoader::onStepDown() { void ShardServerCatalogCacheLoader::onStepUp() { stdx::lock_guard lg(_mutex); invariant(_role != ReplicaSetRole::None); + _contexts.interrupt(ErrorCodes::InterruptedDueToReplStateChange); ++_term; _role = ReplicaSetRole::Primary; } -- cgit v1.2.1