diff options
| author | Lucas de Castro Borges <lucas@gnuabordo.com.br> | 2025-02-14 14:26:38 -0300 |
|---|---|---|
| committer | Lucas de Castro Borges <lucas@gnuabordo.com.br> | 2025-02-14 14:26:38 -0300 |
| commit | 294bc6ecabf14c09c9bc8644704921dcf97cb44e (patch) | |
| tree | 279b1e0bab53901a1647ac63c1c724f0f789a663 /jstests/sharding/awaitable_hello_primary_failures.js | |
| parent | 70be7c27a251621187a1de533462ae2bb1e3bd39 (diff) | |
| parent | 1e917fd798aa25b7066d4b414b51184f13d5a092 (diff) | |
Update upstream source from tag 'upstream/6.0.10'debian/6.0.10-1
Update to upstream version '6.0.10'
with Debian dir 2d176fa254eee97b139f712fec5709641335a8c3
Diffstat (limited to 'jstests/sharding/awaitable_hello_primary_failures.js')
| -rw-r--r-- | jstests/sharding/awaitable_hello_primary_failures.js | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/jstests/sharding/awaitable_hello_primary_failures.js b/jstests/sharding/awaitable_hello_primary_failures.js index b6a387920c3..1522f755347 100644 --- a/jstests/sharding/awaitable_hello_primary_failures.js +++ b/jstests/sharding/awaitable_hello_primary_failures.js @@ -22,9 +22,9 @@ let rsPrimary = st.rs0.getPrimary(); // Make sure mongos knows who the primary is awaitRSClientHosts(mongos, {host: rsPrimary.name}, {ok: true, ismaster: true}); -// Turn on the waitInHello failpoint. This will cause the primary node to cease sending isMaster +// Turn on the waitInHello failpoint. This will cause the primary node to cease sending "hello" // responses and the RSM should mark the node as down -jsTestLog("Turning on waitInHello failpoint. Node should stop sending isMaster responses."); +jsTestLog("Turning on waitInHello failpoint. Node should stop sending hello responses."); const helloFailpoint = configureFailPoint(rsPrimary, "waitInHello"); awaitRSClientHosts(mongos, {host: rsPrimary.name}, {ok: false, ismaster: false}); helloFailpoint.off(); @@ -32,25 +32,26 @@ helloFailpoint.off(); // Wait for mongos to find out the node is still primary awaitRSClientHosts(mongos, {host: rsPrimary.name}, {ok: true, ismaster: true}); -// Force the primary node to fail all isMaster requests. The RSM should mark the node as down. -jsTestLog("Turning on failCommand failpoint. Node should fail all isMaster responses."); -const failCmdFailpoint = configureFailPoint( - rsPrimary, - "failCommand", - {errorCode: ErrorCodes.CommandFailed, failCommands: ["isMaster"], failInternalCommands: true}); +// Force the primary node to fail all "hello" requests. The RSM should mark the node as down. +jsTestLog("Turning on failCommand failpoint. Node should fail all hello/isMaster responses."); +const failCmdFailpoint = configureFailPoint(rsPrimary, "failCommand", { + errorCode: ErrorCodes.CommandFailed, + failCommands: ["hello", "isMaster"], + failInternalCommands: true +}); awaitRSClientHosts(mongos, {host: rsPrimary.name}, {ok: false, ismaster: false}); failCmdFailpoint.off(); // Wait for mongos to find out the node is still primary awaitRSClientHosts(mongos, {host: rsPrimary.name}, {ok: true, ismaster: true}); -// Force the primary node to end the isMaster stream by not setting the 'moreToCome' bit on the +// Force the primary node to end the "hello" stream by not setting the 'moreToCome' bit on the // resposne. The RSM should not mark the server as down or unknown and should continue monitoring // the node. jsTestLog( - "Turning on doNotSetMoreToCome failpoint. Node should return successful isMaster responses."); + "Turning on doNotSetMoreToCome failpoint. Node should return successful hello responses."); const moreToComeFailpoint = configureFailPoint(rsPrimary, "doNotSetMoreToCome"); -// Wait for maxAwaitTimeMS to guarantee that mongos has received at least one isMaster response from +// Wait for maxAwaitTimeMS to guarantee that mongos has received at least one "hello" response from // the primary without the moreToCome bit set. sleep(10000); awaitRSClientHosts(mongos, {host: rsPrimary.name}, {ok: true, ismaster: true}); |
