|
As a result, nodes blocked on Global locks can vote in dry runs but would block on actual elections.
Here is an example:
dry run:
2020-09-18T09:55:22.110+1000 I COMMAND [conn15] command admin.$cmd command: replSetRequestVotes { replSetRequestVotes: 1, setName: "replset", dryRun: true, term: 1, candidateIndex: 2, configVersion: 1, lastCommittedOp: { ts: Timestamp(1600386902, 1), t: 1 }, $clusterTime: { clusterTime: Timestamp(1600386902, 1), signature: { hash: BinData(0, 6DB77428788E3FCF244CC5F5AD4BCBE5DC14E2FB), keyId: 6873609104389046273 } }, $db: "admin" } numYields:0 reslen:204 locks:{} protocol:op_msg 0ms
|
actual election:
2020-09-18T09:55:22.130+1000 I COMMAND [conn15] command local.replset.election command: replSetRequestVotes { replSetRequestVotes: 1, setName: "replset", dryRun: false, term: 2, candidateIndex: 2, configVersion: 1, lastCommittedOp: { ts: Timestamp(1600386902, 1), t: 1 }, $clusterTime: { clusterTime: Timestamp(1600386902, 1), signature: { hash: BinData(0, 6DB77428788E3FCF244CC5F5AD4BCBE5DC14E2FB), keyId: 6873609104389046273 } }, $db: "admin" } numYields:0 reslen:204 locks:{ Global: { acquireCount: { r: 2, w: 1 } }, Database: { acquireCount: { r: 1, w: 1 } }, Collection: { acquireCount: { r: 1, w: 1 } } } storage:{} protocol:op_msg 6ms
|
Should we consider acquiring intent locks on dry runs?
|