diff options
author | Jordi Serra Torrens <jordi.serra-torrens@mongodb.com> | 2021-03-23 10:32:39 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-04-06 10:36:03 +0000 |
commit | 3aa71ec3ef14d5354850e905600aa5cda2fcbba3 (patch) | |
tree | c86e16a709aafbd65d47294b024d4f2ba209b377 /src/mongo/db/error_labels_test.cpp | |
parent | 9f32e927f98cea09100e10e7fd564df725a42deb (diff) | |
download | mongo-3aa71ec3ef14d5354850e905600aa5cda2fcbba3.tar.gz |
SERVER-54020: ShardInvalidatedForTargeting thrown by resharding's getDestinedRecipient() not being retried by mongos
Diffstat (limited to 'src/mongo/db/error_labels_test.cpp')
-rw-r--r-- | src/mongo/db/error_labels_test.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mongo/db/error_labels_test.cpp b/src/mongo/db/error_labels_test.cpp index 07b597ffaf6..aa7fa88aefe 100644 --- a/src/mongo/db/error_labels_test.cpp +++ b/src/mongo/db/error_labels_test.cpp @@ -69,6 +69,12 @@ TEST(IsTransientTransactionErrorTest, TenantMigrationAbortedIsTransient) { false /* isCommitOrAbort */)); } +TEST(IsTransientTransactionErrorTest, ShardCannotRefreshDueToLocksHeldIsTransient) { + ASSERT_TRUE(isTransientTransactionError(ErrorCodes::ShardCannotRefreshDueToLocksHeld, + false /* hasWriteConcernError */, + false /* isCommitOrAbort */)); +} + TEST(IsTransientTransactionErrorTest, ShardInvalidatedForTargetingIsTransient) { ASSERT_TRUE(isTransientTransactionError(ErrorCodes::ShardInvalidatedForTargeting, false /* hasWriteConcernError */, |