summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavi Vetriselvan <pavithra.vetriselvan@mongodb.com>2020-10-06 10:55:10 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-10-19 14:45:15 +0000
commit38e0a213e7f38006656ecce9c782ad318ac537ca (patch)
tree41dfac2963b80a772a6a173d2f9ce84c657f3a68
parent453ac9856bd82b05d00f4f70d808571602810611 (diff)
downloadmongo-38e0a213e7f38006656ecce9c782ad318ac537ca.tar.gz
SERVER-51260 Rename hangWhileWaitingForIsMasterResponse failpoint to hangWhileWaitingForHelloResponse
-rw-r--r--jstests/noPassthrough/awaitable_ismaster_metrics.js4
-rw-r--r--src/mongo/db/repl/replication_coordinator_impl.cpp12
-rw-r--r--src/mongo/s/mongos_topology_coordinator.cpp10
3 files changed, 13 insertions, 13 deletions
diff --git a/jstests/noPassthrough/awaitable_ismaster_metrics.js b/jstests/noPassthrough/awaitable_ismaster_metrics.js
index 688e8ca659c..c8f6c67ef61 100644
--- a/jstests/noPassthrough/awaitable_ismaster_metrics.js
+++ b/jstests/noPassthrough/awaitable_ismaster_metrics.js
@@ -80,14 +80,14 @@ replTest.initiate();
const primary = replTest.getPrimary();
// A failpoint signalling that the server has received the command request and is waiting for a
// topology change or maxAwaitTimeMS.
-failPoint = configureFailPoint(primary, "hangWhileWaitingForIsMasterResponse");
+failPoint = configureFailPoint(primary, "hangWhileWaitingForHelloResponse");
runTest(primary.getDB("admin"), "hello", failPoint);
runTest(primary.getDB("admin"), "isMaster", failPoint);
runTest(primary.getDB("admin"), "ismaster", 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"), "hello", failPoint);
runTest(st.s.getDB("admin"), "isMaster", failPoint);
runTest(st.s.getDB("admin"), "ismaster", failPoint);
diff --git a/src/mongo/db/repl/replication_coordinator_impl.cpp b/src/mongo/db/repl/replication_coordinator_impl.cpp
index b00244481e5..10ad834d55b 100644
--- a/src/mongo/db/repl/replication_coordinator_impl.cpp
+++ b/src/mongo/db/repl/replication_coordinator_impl.cpp
@@ -121,9 +121,9 @@ 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 an isMaster request to hang after it times out waiting for a topology change.
+// Will cause a hello request to hang as it starts waiting.
+MONGO_FAIL_POINT_DEFINE(hangWhileWaitingForHelloResponse);
+// Will cause a hello request to hang after it times out waiting for a topology change.
MONGO_FAIL_POINT_DEFINE(hangAfterWaitingForTopologyChangeTimesOut);
MONGO_FAIL_POINT_DEFINE(skipDurableTimestampUpdates);
// Skip sending heartbeats to pre-check that a quorum is available before a reconfig.
@@ -2281,9 +2281,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/mongos_topology_coordinator.cpp b/src/mongo/s/mongos_topology_coordinator.cpp
index e65733734ac..9c235e746ca 100644
--- a/src/mongo/s/mongos_topology_coordinator.cpp
+++ b/src/mongo/s/mongos_topology_coordinator.cpp
@@ -56,10 +56,10 @@ MONGO_INITIALIZER(GenerateMongosInstanceId)(InitializerContext*) {
// Signals that an isMaster request has started waiting.
MONGO_FAIL_POINT_DEFINE(waitForIsMasterResponse);
-// Awaitable isMaster requests with the proper topologyVersions are expected to wait for
+// Awaitable hello requests with the proper topologyVersions are expected to wait for
// maxAwaitTimeMS on mongos. When set, this failpoint will hang right before waiting on a
// topology change.
-MONGO_FAIL_POINT_DEFINE(hangWhileWaitingForIsMasterResponse);
+MONGO_FAIL_POINT_DEFINE(hangWhileWaitingForHelloResponse);
// Failpoint for hanging during quiesce mode on mongos.
MONGO_FAIL_POINT_DEFINE(hangDuringQuiesceMode);
@@ -159,9 +159,9 @@ std::shared_ptr<const MongosIsMasterResponse> MongosTopologyCoordinator::awaitIs
LOGV2(4695704, "waitForIsMasterResponse failpoint enabled");
}
- if (MONGO_unlikely(hangWhileWaitingForIsMasterResponse.shouldFail())) {
- LOGV2(4695501, "hangWhileWaitingForIsMasterResponse failpoint enabled");
- hangWhileWaitingForIsMasterResponse.pauseWhileSet(opCtx);
+ if (MONGO_unlikely(hangWhileWaitingForHelloResponse.shouldFail())) {
+ LOGV2(4695501, "hangWhileWaitingForHelloResponse failpoint enabled");
+ hangWhileWaitingForHelloResponse.pauseWhileSet(opCtx);
}
// Wait for a mongos topology change with timeout set to deadline.