diff options
author | Abdul Qadeer <abdul.qadeer@mongodb.com> | 2022-10-11 22:35:50 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-10-12 19:03:48 +0000 |
commit | b93222988f3d645ef5b0974106da54be236cb632 (patch) | |
tree | d138215d743cbd461506f5aa014570afc2683f14 | |
parent | fdfc76048e419ce88f0401d95fb0b75810893f43 (diff) | |
download | mongo-b93222988f3d645ef5b0974106da54be236cb632.tar.gz |
SERVER-70364 Retry once on network error
(cherry picked from commit 95dfa466a644820567342fdcc7fd9e3da3abd875)
-rw-r--r-- | jstests/sharding/libs/resharding_test_fixture.js | 15 | ||||
-rw-r--r-- | jstests/sharding/resharding_coordinator_recovers_abort_decision.js | 3 |
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 1091ee70ce8..79620ef1a67 100644 --- a/jstests/sharding/libs/resharding_test_fixture.js +++ b/jstests/sharding/libs/resharding_test_fixture.js @@ -594,18 +594,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 357b155512c..1a3e45e23b0 100644 --- a/jstests/sharding/resharding_coordinator_recovers_abort_decision.js +++ b/jstests/sharding/resharding_coordinator_recovers_abort_decision.js @@ -115,7 +115,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(); }, }); |