diff options
author | Sergi Mateo Bellido <sergi.mateo-bellido@mongodb.com> | 2021-07-22 06:50:34 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-07-23 07:55:05 +0000 |
commit | 7a8df38d284e16a60884569a90ddfa07586d9ec0 (patch) | |
tree | d67bb5886c01bb4f50f1aa2c053ca9d77c057e4b | |
parent | fcdbc97ec75cad751764c43343e018d0ffd3f642 (diff) | |
download | mongo-7a8df38d284e16a60884569a90ddfa07586d9ec0.tar.gz |
SERVER-58747 The ShardServerCatalogCacheLoader doesn't interrupt ongoing operations on step up
-rw-r--r-- | src/mongo/db/s/shard_server_catalog_cache_loader.cpp | 1 |
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 5ac3a6a0056..ee4ff25d751 100644 --- a/src/mongo/db/s/shard_server_catalog_cache_loader.cpp +++ b/src/mongo/db/s/shard_server_catalog_cache_loader.cpp @@ -464,6 +464,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; } |