summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSergi Mateo Bellido <sergi.mateo-bellido@mongodb.com>2021-07-22 06:50:34 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-07-25 13:32:03 +0000
commit4b16e0d00a54e18f7b6bcb2a999ebee6c1e49ea5 (patch)
tree86209c666c02d1cfb862ee5fc8980905dd3cee20 /src
parent0f7983d9be770a60ae3cf5c04bffb60d0b61595f (diff)
downloadmongo-4b16e0d00a54e18f7b6bcb2a999ebee6c1e49ea5.tar.gz
SERVER-58747 The ShardServerCatalogCacheLoader doesn't interrupt ongoing operations on step up
(cherry picked from commit 7a8df38d284e16a60884569a90ddfa07586d9ec0)
Diffstat (limited to 'src')
-rw-r--r--src/mongo/db/s/shard_server_catalog_cache_loader.cpp1
1 files changed, 1 insertions, 0 deletions
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<Latch> lg(_mutex);
invariant(_role != ReplicaSetRole::None);
+ _contexts.interrupt(ErrorCodes::InterruptedDueToReplStateChange);
++_term;
_role = ReplicaSetRole::Primary;
}