summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbdul Qadeer <abdul.qadeer@mongodb.com>2022-10-11 22:35:50 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-10-12 19:16:06 +0000
commit316a5717fe08153421d708863514b776b625e498 (patch)
tree1efe00a33d07d26e03efd7169d5637dd3f24c696
parent5368d8dc803d1e6506e26eecacd19d7c917f9488 (diff)
downloadmongo-316a5717fe08153421d708863514b776b625e498.tar.gz
SERVER-70364 Retry once on network error
(cherry picked from commit 95dfa466a644820567342fdcc7fd9e3da3abd875)
-rw-r--r--jstests/sharding/libs/resharding_test_fixture.js15
-rw-r--r--jstests/sharding/resharding_coordinator_recovers_abort_decision.js3
2 files changed, 8 insertions, 10 deletions
diff --git a/jstests/sharding/libs/resharding_test_fixture.js b/jstests/sharding/libs/resharding_test_fixture.js
index 2edd23b4189..6e918c9e07f 100644
--- a/jstests/sharding/libs/resharding_test_fixture.js
+++ b/jstests/sharding/libs/resharding_test_fixture.js
@@ -564,18 +564,15 @@ var ReshardingTest = class {
});
} else {
this._callFunctionSafely(() => {
- this.retryOnceOnNetworkError( //
- () => this._pauseCoordinatorBeforeBlockingWritesFailpoints.forEach(
- fp => fp.off()));
-
+ this._pauseCoordinatorBeforeBlockingWritesFailpoints.forEach(
+ fp => this.retryOnceOnNetworkError(fp.off));
postCheckConsistencyFn();
- this.retryOnceOnNetworkError(
- () => this._pauseCoordinatorBeforeDecisionPersistedFailpoints.forEach(
- fp => fp.off()));
+ this._pauseCoordinatorBeforeDecisionPersistedFailpoints.forEach(
+ fp => this.retryOnceOnNetworkError(fp.off));
postDecisionPersistedFn();
- this.retryOnceOnNetworkError(
- () => this._pauseCoordinatorBeforeCompletionFailpoints.forEach(fp => fp.off()));
+ this._pauseCoordinatorBeforeCompletionFailpoints.forEach(
+ fp => this.retryOnceOnNetworkError(fp.off));
});
}
diff --git a/jstests/sharding/resharding_coordinator_recovers_abort_decision.js b/jstests/sharding/resharding_coordinator_recovers_abort_decision.js
index ecbe91ee159..35a8275d7d0 100644
--- a/jstests/sharding/resharding_coordinator_recovers_abort_decision.js
+++ b/jstests/sharding/resharding_coordinator_recovers_abort_decision.js
@@ -118,7 +118,8 @@ reshardingTest.withReshardingInBackground(
const configRS = reshardingTest.getReplSetForShard(reshardingTest.configShardName);
configRS.awaitSecondaryNodes();
configRS.awaitReplication();
- reshardCollectionJoinedFailPointsList.forEach(fp => fp.off());
+ reshardCollectionJoinedFailPointsList.forEach(
+ fp => reshardingTest.retryOnceOnNetworkError(fp.off));
shardsvrAbortReshardCollectionFailpoint.off();
},
});