diff options
author | Abdul Qadeer <abdul.qadeer@mongodb.com> | 2022-08-22 12:47:28 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-08-22 13:19:31 +0000 |
commit | ba75ef94152996b7b61b2da9f22a772cb160d731 (patch) | |
tree | 3eb47bcade389097e2c07a1d599e9e9fe7fe38d1 | |
parent | 5518f4e3de045cf3cbbd01d1d4a98dfa5939517c (diff) | |
download | mongo-ba75ef94152996b7b61b2da9f22a772cb160d731.tar.gz |
SERVER-67618 Remove usage of ErrorCategory::Interruption in Sharding
-rw-r--r-- | src/mongo/db/s/config/sharding_catalog_manager.cpp | 6 | ||||
-rw-r--r-- | src/mongo/db/s/resharding/resharding_oplog_fetcher.cpp | 6 |
2 files changed, 2 insertions, 10 deletions
diff --git a/src/mongo/db/s/config/sharding_catalog_manager.cpp b/src/mongo/db/s/config/sharding_catalog_manager.cpp index 753942782ba..d85ab9fc272 100644 --- a/src/mongo/db/s/config/sharding_catalog_manager.cpp +++ b/src/mongo/db/s/config/sharding_catalog_manager.cpp @@ -725,10 +725,8 @@ void ShardingCatalogManager::withTransaction( size_t attempt = 1; while (true) { - // Some ErrorCategory::Interruption errors are also considered transient transaction - // errors. We don't attempt to enumerate them explicitly. Instead, we retry on all - // ErrorCategory::Interruption errors (e.g. LockTimeout) and detect whether asr.opCtx() - // was killed by explicitly checking if it has been interrupted. + // We retry on transient transaction errors like LockTimeout and detect whether + // asr.opCtx() was killed by explicitly checking if it has been interrupted. asr.opCtx()->checkForInterrupt(); ++txnNumber; diff --git a/src/mongo/db/s/resharding/resharding_oplog_fetcher.cpp b/src/mongo/db/s/resharding/resharding_oplog_fetcher.cpp index 8d85e96d61a..a2cf65fadc4 100644 --- a/src/mongo/db/s/resharding/resharding_oplog_fetcher.cpp +++ b/src/mongo/db/s/resharding/resharding_oplog_fetcher.cpp @@ -212,12 +212,6 @@ bool ReshardingOplogFetcher::iterate(Client* client, CancelableOperationContextF try { return consume(client, factory, targetShard.get()); - } catch (const ExceptionForCat<ErrorCategory::Interruption>&) { - // Defer to the cancellation token for whether the Interruption exception should be retried - // upon or not. It is possible the error came as the response from the remote donor shard. - // It is also possible that the error is from a stray killOp command being run on this - // recipient shard. - return true; } catch (const ExceptionFor<ErrorCodes::OplogQueryMinTsMissing>&) { LOGV2_ERROR( 5192103, "Fatal resharding error while fetching.", "error"_attr = exceptionToStatus()); |