diff options
4 files changed, 10 insertions, 18 deletions
diff --git a/buildscripts/resmokeconfig/suites/concurrency_sharded_multi_stmt_txn_kill_primary.yml b/buildscripts/resmokeconfig/suites/concurrency_sharded_multi_stmt_txn_kill_primary.yml index 7c64f339788..10b621597d3 100644 --- a/buildscripts/resmokeconfig/suites/concurrency_sharded_multi_stmt_txn_kill_primary.yml +++ b/buildscripts/resmokeconfig/suites/concurrency_sharded_multi_stmt_txn_kill_primary.yml @@ -209,12 +209,6 @@ selector: - jstests/concurrency/fsm_workloads/remove_where.js - jstests/concurrency/fsm_workloads/update_where.js - # These workloads use the createIndexes command and are not resilient to HostUnreachable - # and InterruptedDueToReplStateChange errors induced by this suite. - # TODO Unblacklist (SERVER-45112). - - jstests/concurrency/fsm_workloads/create_index_background_unique.js - - jstests/concurrency/fsm_workloads/create_index_background_unique_capped.js - exclude_with_any_tags: - requires_replication # Sharing cursors between state functions will fail in this suite because it will attempt to use diff --git a/buildscripts/resmokeconfig/suites/concurrency_sharded_multi_stmt_txn_terminate_primary.yml b/buildscripts/resmokeconfig/suites/concurrency_sharded_multi_stmt_txn_terminate_primary.yml index 25350ecef3e..e33d5ddbf5d 100644 --- a/buildscripts/resmokeconfig/suites/concurrency_sharded_multi_stmt_txn_terminate_primary.yml +++ b/buildscripts/resmokeconfig/suites/concurrency_sharded_multi_stmt_txn_terminate_primary.yml @@ -209,12 +209,6 @@ selector: - jstests/concurrency/fsm_workloads/remove_where.js - jstests/concurrency/fsm_workloads/update_where.js - # These workloads use the createIndexes command and are not resilient to HostUnreachable - # and InterruptedDueToReplStateChange errors induced by this suite. - # TODO Unblacklist (SERVER-45112). - - jstests/concurrency/fsm_workloads/create_index_background_unique.js - - jstests/concurrency/fsm_workloads/create_index_background_unique_capped.js - exclude_with_any_tags: - requires_replication # Sharing cursors between state functions will fail in this suite because it will attempt to use diff --git a/buildscripts/resmokeconfig/suites/concurrency_sharded_multi_stmt_txn_with_stepdowns.yml b/buildscripts/resmokeconfig/suites/concurrency_sharded_multi_stmt_txn_with_stepdowns.yml index 6e0b9f86f1f..e2c24ba992f 100644 --- a/buildscripts/resmokeconfig/suites/concurrency_sharded_multi_stmt_txn_with_stepdowns.yml +++ b/buildscripts/resmokeconfig/suites/concurrency_sharded_multi_stmt_txn_with_stepdowns.yml @@ -191,12 +191,6 @@ selector: - jstests/concurrency/fsm_workloads/remove_where.js - jstests/concurrency/fsm_workloads/update_where.js - # These workloads use the createIndexes command and are not resilient to HostUnreachable - # and InterruptedDueToReplStateChange errors induced by this suite. - # TODO Unblacklist (SERVER-45112). - - jstests/concurrency/fsm_workloads/create_index_background_unique.js - - jstests/concurrency/fsm_workloads/create_index_background_unique_capped.js - exclude_with_any_tags: - does_not_support_causal_consistency - requires_replication diff --git a/src/mongo/s/cluster_commands_helpers.cpp b/src/mongo/s/cluster_commands_helpers.cpp index 7d80604743a..b52daddc718 100644 --- a/src/mongo/s/cluster_commands_helpers.cpp +++ b/src/mongo/s/cluster_commands_helpers.cpp @@ -38,6 +38,7 @@ #include "mongo/bson/util/bson_extract.h" #include "mongo/db/commands.h" #include "mongo/db/curop.h" +#include "mongo/db/error_labels.h" #include "mongo/db/logical_clock.h" #include "mongo/db/namespace_string.h" #include "mongo/db/query/cursor_response.h" @@ -446,6 +447,15 @@ bool appendRawResponses(OperationContext* opCtx, const auto processError = [&](const ShardId& shardId, const Status& status) { invariant(!status.isOK()); + // It is safe to pass `hasWriteConcernError` as false in the below check because operations + // run inside transactions do not wait for write concern, except for commit and abort. + if (TransactionRouter::get(opCtx) && + isTransientTransactionError( + status.code(), false /*hasWriteConcernError*/, false /*isCommitOrAbort*/)) { + // Re-throw on transient transaction errors to make sure appropriate error labels are + // appended to the result. + uassertStatusOK(status); + } if (ignorableErrors.find(status.code()) != ignorableErrors.end()) { ignorableErrorsReceived.emplace_back(std::move(shardId), std::move(status)); return; |