diff options
author | Pavi Vetriselvan <pavithra.vetriselvan@mongodb.com> | 2020-10-06 10:55:10 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-11-02 21:23:08 +0000 |
commit | 0ebf1889c945303ad54b9ac41e7b2004d37590eb (patch) | |
tree | 0c98de55f16a9a55af858242442dad0b63e91003 | |
parent | 89e6e8c17e28e00653c1f01870dc1481dbc72f12 (diff) | |
download | mongo-0ebf1889c945303ad54b9ac41e7b2004d37590eb.tar.gz |
SERVER-51260 Rename hangWhileWaitingForIsMasterResponse failpoint to hangWhileWaitingForHelloResponse
(cherry picked from commit 38e0a213e7f38006656ecce9c782ad318ac537ca)
-rw-r--r-- | jstests/noPassthrough/awaitable_ismaster_metrics.js | 4 | ||||
-rw-r--r-- | src/mongo/db/repl/replication_coordinator_impl.cpp | 10 | ||||
-rw-r--r-- | src/mongo/s/commands/cluster_is_master_cmd.cpp | 10 |
3 files changed, 12 insertions, 12 deletions
diff --git a/jstests/noPassthrough/awaitable_ismaster_metrics.js b/jstests/noPassthrough/awaitable_ismaster_metrics.js index 35a379bb6ea..bfbcefa47e3 100644 --- a/jstests/noPassthrough/awaitable_ismaster_metrics.js +++ b/jstests/noPassthrough/awaitable_ismaster_metrics.js @@ -79,12 +79,12 @@ replTest.initiate(); const primary = replTest.getPrimary(); // A failpoint signalling that the server has received the IsMaster request and is waiting for a // topology change or maxAwaitTimeMS. -failPoint = configureFailPoint(primary, "hangWhileWaitingForIsMasterResponse"); +failPoint = configureFailPoint(primary, "hangWhileWaitingForHelloResponse"); runTest(primary.getDB("admin"), failPoint); replTest.stopSet(); const st = new ShardingTest({mongos: 1, shards: [{nodes: 1}], config: 1}); -failPoint = configureFailPoint(st.s, "hangWhileWaitingForIsMasterResponse"); +failPoint = configureFailPoint(st.s, "hangWhileWaitingForHelloResponse"); runTest(st.s.getDB("admin"), failPoint); st.stop(); })(); diff --git a/src/mongo/db/repl/replication_coordinator_impl.cpp b/src/mongo/db/repl/replication_coordinator_impl.cpp index f58c1784833..0c804140281 100644 --- a/src/mongo/db/repl/replication_coordinator_impl.cpp +++ b/src/mongo/db/repl/replication_coordinator_impl.cpp @@ -120,8 +120,8 @@ MONGO_FAIL_POINT_DEFINE(setMaintenanceModeFailsWithNotSecondary); MONGO_FAIL_POINT_DEFINE(forceSyncSourceRetryWaitForInitialSync); // Signals that an isMaster request has started waiting. MONGO_FAIL_POINT_DEFINE(waitForIsMasterResponse); -// Will cause an isMaster request to hang as it starts waiting. -MONGO_FAIL_POINT_DEFINE(hangWhileWaitingForIsMasterResponse); +// Will cause a hello request to hang as it starts waiting. +MONGO_FAIL_POINT_DEFINE(hangWhileWaitingForHelloResponse); MONGO_FAIL_POINT_DEFINE(skipDurableTimestampUpdates); // Will cause a reconfig to hang after completing the config quorum check. MONGO_FAIL_POINT_DEFINE(omitConfigQuorumCheck); @@ -2196,9 +2196,9 @@ std::shared_ptr<const IsMasterResponse> ReplicationCoordinatorImpl::awaitIsMaste // change. LOGV2(31464, "waitForIsMasterResponse failpoint enabled"); } - if (MONGO_unlikely(hangWhileWaitingForIsMasterResponse.shouldFail())) { - LOGV2(21341, "Hanging due to hangWhileWaitingForIsMasterResponse failpoint"); - hangWhileWaitingForIsMasterResponse.pauseWhileSet(opCtx); + if (MONGO_unlikely(hangWhileWaitingForHelloResponse.shouldFail())) { + LOGV2(21341, "Hanging due to hangWhileWaitingForHelloResponse failpoint"); + hangWhileWaitingForHelloResponse.pauseWhileSet(opCtx); } // Wait for a topology change with timeout set to deadline. diff --git a/src/mongo/s/commands/cluster_is_master_cmd.cpp b/src/mongo/s/commands/cluster_is_master_cmd.cpp index 956c0478ec1..8f399ca650e 100644 --- a/src/mongo/s/commands/cluster_is_master_cmd.cpp +++ b/src/mongo/s/commands/cluster_is_master_cmd.cpp @@ -54,9 +54,9 @@ namespace mongo { // Hangs in the beginning of each hello command when set. MONGO_FAIL_POINT_DEFINE(waitInHello); -// Awaitable isMaster requests with the proper topologyVersions are expected to sleep for +// Awaitable hello requests with the proper topologyVersions are expected to sleep for // maxAwaitTimeMS on mongos. This failpoint will hang right before doing this sleep when set. -MONGO_FAIL_POINT_DEFINE(hangWhileWaitingForIsMasterResponse); +MONGO_FAIL_POINT_DEFINE(hangWhileWaitingForHelloResponse); TopologyVersion mongosTopologyVersion; @@ -170,9 +170,9 @@ public: IsMasterMetrics::get(opCtx)->incrementNumAwaitingTopologyChanges(); ON_BLOCK_EXIT( [&] { IsMasterMetrics::get(opCtx)->decrementNumAwaitingTopologyChanges(); }); - if (MONGO_unlikely(hangWhileWaitingForIsMasterResponse.shouldFail())) { - LOGV2(31463, "hangWhileWaitingForIsMasterResponse failpoint enabled."); - hangWhileWaitingForIsMasterResponse.pauseWhileSet(opCtx); + if (MONGO_unlikely(hangWhileWaitingForHelloResponse.shouldFail())) { + LOGV2(31463, "hangWhileWaitingForHelloResponse failpoint enabled."); + hangWhileWaitingForHelloResponse.pauseWhileSet(opCtx); } opCtx->sleepFor(Milliseconds(maxAwaitTimeMS)); } |