...
We are vulnerable to reach to this Invariant following this scenario: 1- A follower node called for a dry run election due to catchup takeover and sent primaryIndex to voteRequester to start scatter_and_gather_runner to send voteRequests to all voters. 2- All Requests has been scheduled with processResponse as callbacks 3- Primary node's response is the last response to be processed, which indicates that _callbacks list is empty. 4- The request to the Primary Node failed so we end-up with failed response and we return leaving _primaryVote unchanged as PrimaryVote::Pending. 5- So the call to hasReceivedSufficientResponses will return false causing the Invariant to fire. Ask to add more diagnostic information: Can we add primaryIndex to that log line to log what is the last known primaryIndex for this node while running for the dry-run catchup takeover.
xgen-internal-githook commented on Tue, 2 Jan 2024 17:10:29 +0000: Author: {'name': 'Vishnu Kaushik', 'email': 'vishnu.kaushik@mongodb.com', 'username': 'kauboy26'} Message: SERVER-55465 Response from all nodes means sufficient responses have been received even if primary gave bad response in catchup takeover dry run (cherry picked from commit efec3cc4b253d02fa9e11947ce92d53b727181b0) GitOrigin-RevId: 26b41a69a0b4f7fe8170158a9f77e63d408d5849 Branch: v5.0 https://github.com/mongodb/mongo/commit/c460c84942fbbbd36948da98c2c25803612379ca JIRAUSER1259052 commented on Wed, 6 Oct 2021 18:58:24 +0000: Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it’s been triggered. For more active release information, please keep an eye on #server-release. Thank you! xgen-internal-githook commented on Tue, 6 Jul 2021 16:15:43 +0000: Author: {'name': 'Vishnu Kaushik', 'email': 'vishnu.kaushik@mongodb.com', 'username': 'kauboy26'} Message: SERVER-55465 Response from all nodes means sufficient responses have been received even if primary gave bad response in catchup takeover dry run Branch: v4.2 https://github.com/mongodb/mongo/commit/a611900d667b861528d04492c48972be17a00a0a xgen-internal-githook commented on Tue, 6 Jul 2021 13:24:28 +0000: Author: {'name': 'Vishnu Kaushik', 'email': 'vishnu.kaushik@mongodb.com', 'username': 'kauboy26'} Message: SERVER-55465 Response from all nodes means sufficient responses have been received even if primary gave bad response in catchup takeover dry run Branch: v4.0 https://github.com/mongodb/mongo/commit/14fb0899e131721ba80a2cc921cdb9b7d6f3dafa xgen-internal-githook commented on Tue, 29 Jun 2021 16:48:22 +0000: Author: {'name': 'Vishnu Kaushik', 'email': 'vishnu.kaushik@mongodb.com', 'username': 'kauboy26'} Message: SERVER-55465 Response from all nodes means sufficient responses have been received even if primary gave bad response in catchup takeover dry run Branch: v4.4 https://github.com/mongodb/mongo/commit/ab6c88a7db9b16ff8120a6c2ad63f2fe597bc388 xgen-internal-githook commented on Thu, 10 Jun 2021 20:24:33 +0000: Author: {'name': 'Vishnu Kaushik', 'email': 'vishnu.kaushik@mongodb.com', 'username': 'kauboy26'} Message: SERVER-55465 Response from all nodes means sufficient responses have been received even if primary gave bad response in catchup takeover dry run Branch: master https://github.com/mongodb/mongo/commit/efec3cc4b253d02fa9e11947ce92d53b727181b0 JIRAUSER1257896 commented on Wed, 24 Mar 2021 17:07:33 +0000: One proposal is to move this check: if (_responsesProcessed == static_cast(_targets.size())) { return true; } to be the first check in hasReceivedSufficientResponses