summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLingzhi Deng <lingzhi.deng@mongodb.com>2019-11-20 21:05:40 +0000
committerevergreen <evergreen@mongodb.com>2019-11-20 21:05:40 +0000
commitb077212a48653b1668cee67f6888cd65b5d123f6 (patch)
tree7e507243ceec464674b7a9f58a9d0eb39af2c41c /src
parentd86e8a5bf40f1c6edbab37bef38cd0f1d5dc062d (diff)
downloadmongo-b077212a48653b1668cee67f6888cd65b5d123f6.tar.gz
SERVER-44519: Label ExceededTimeLimit errors with RetryableWriteError label
Diffstat (limited to 'src')
-rw-r--r--src/mongo/base/error_codes.yml2
-rw-r--r--src/mongo/db/s/sharding_logging_test.cpp2
-rw-r--r--src/mongo/s/catalog/sharding_catalog_test.cpp6
3 files changed, 5 insertions, 5 deletions
diff --git a/src/mongo/base/error_codes.yml b/src/mongo/base/error_codes.yml
index 877a90fff0d..1ef2663b35f 100644
--- a/src/mongo/base/error_codes.yml
+++ b/src/mongo/base/error_codes.yml
@@ -286,7 +286,7 @@ error_codes:
- {code: 259,name: KeyedExecutorRetry}
- {code: 260,name: InvalidResumeToken}
- {code: 261,name: TooManyLogicalSessions}
- - {code: 262,name: ExceededTimeLimit,categories: [Interruption,ExceededTimeLimitError]}
+ - {code: 262,name: ExceededTimeLimit,categories: [Interruption,ExceededTimeLimitError, RetriableError]}
- {code: 263,name: OperationNotSupportedInTransaction}
- {code: 264,name: TooManyFilesOpen}
- {code: 265,name: OrphanedRangeCleanUpFailed}
diff --git a/src/mongo/db/s/sharding_logging_test.cpp b/src/mongo/db/s/sharding_logging_test.cpp
index 6d2fa80994e..2fefc1ddae0 100644
--- a/src/mongo/db/s/sharding_logging_test.cpp
+++ b/src/mongo/db/s/sharding_logging_test.cpp
@@ -148,7 +148,7 @@ protected:
BSONObjBuilder createResponseBuilder;
CommandHelpers::appendCommandStatusNoThrow(
- createResponseBuilder, Status(ErrorCodes::ExceededTimeLimit, "operation timed out"));
+ createResponseBuilder, Status(ErrorCodes::Interrupted, "operation interrupted"));
expectConfigCollectionCreate(
configHost, getConfigCollName(), _cappedSize, createResponseBuilder.obj());
diff --git a/src/mongo/s/catalog/sharding_catalog_test.cpp b/src/mongo/s/catalog/sharding_catalog_test.cpp
index 0885054f185..3f6e0decf83 100644
--- a/src/mongo/s/catalog/sharding_catalog_test.cpp
+++ b/src/mongo/s/catalog/sharding_catalog_test.cpp
@@ -1129,7 +1129,7 @@ TEST_F(ShardingCatalogClientTest, UpdateDatabase) {
future.default_timed_get();
}
-TEST_F(ShardingCatalogClientTest, UpdateConfigDocumentExceededTimeLimit) {
+TEST_F(ShardingCatalogClientTest, UpdateConfigDocumentNonRetryableError) {
HostAndPort host1("TestHost1");
configTargeter()->setFindHostReturnValue(host1);
@@ -1143,7 +1143,7 @@ TEST_F(ShardingCatalogClientTest, UpdateConfigDocumentExceededTimeLimit) {
dbt.toBSON(),
true,
ShardingCatalogClient::kMajorityWriteConcern);
- ASSERT_EQ(ErrorCodes::ExceededTimeLimit, status);
+ ASSERT_EQ(ErrorCodes::Interrupted, status);
});
onCommand([host1](const RemoteCommandRequest& request) {
@@ -1151,7 +1151,7 @@ TEST_F(ShardingCatalogClientTest, UpdateConfigDocumentExceededTimeLimit) {
ASSERT_EQUALS(host1, request.target);
BatchedCommandResponse response;
- response.setStatus({ErrorCodes::ExceededTimeLimit, "operation timed out"});
+ response.setStatus({ErrorCodes::Interrupted, "operation interrupted"});
return response.toBSON();
} catch (const DBException& ex) {