summaryrefslogtreecommitdiff
path: root/src/mongo/db/s/sharding_ddl_coordinator.cpp
diff options
context:
space:
mode:
authorMarcos Jose Grillo Ramirez <marcos.grillo@mongodb.com>2021-05-19 15:51:49 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-05-19 16:41:55 +0000
commit29213e17853c07afe83084504a07fc28695dae9c (patch)
treed40c98756e8d1c28c746ab7046b161eb5556cc90 /src/mongo/db/s/sharding_ddl_coordinator.cpp
parent149d35fe8abfd90c8579888b0858ab32b198a01d (diff)
downloadmongo-29213e17853c07afe83084504a07fc28695dae9c.tar.gz
SERVER-57023 Add retriable error categories into ddl coordinator retry logic
Diffstat (limited to 'src/mongo/db/s/sharding_ddl_coordinator.cpp')
-rw-r--r--src/mongo/db/s/sharding_ddl_coordinator.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/mongo/db/s/sharding_ddl_coordinator.cpp b/src/mongo/db/s/sharding_ddl_coordinator.cpp
index 0f18a2685ac..77a43a70f53 100644
--- a/src/mongo/db/s/sharding_ddl_coordinator.cpp
+++ b/src/mongo/db/s/sharding_ddl_coordinator.cpp
@@ -181,11 +181,14 @@ SemiFuture<void> ShardingDDLCoordinator::run(std::shared_ptr<executor::ScopedTas
// - The coordiantor failed with non-retryable error
// - The node is stepping/shutting down
//
- // If the token is not cancelled we retry stepdown errors because it could have
- // been generated by a remote node.
+ // If the token is not cancelled we retry because it could have been generated
+ // by a remote node.
if (!status.isOK() &&
- (status.isA<ErrorCategory::NotPrimaryError>() ||
- status.isA<ErrorCategory::ShutdownError>()) &&
+ (status.isA<ErrorCategory::CursorInvalidatedError>() ||
+ status.isA<ErrorCategory::ShutdownError>() ||
+ status.isA<ErrorCategory::RetriableError>() ||
+ status.isA<ErrorCategory::CancellationError>() ||
+ status == ErrorCodes::Interrupted) &&
!token.isCanceled()) {
LOGV2_DEBUG(5656000,
1,