[SERVER-47141] Make failpoint in NetworkInterfaceTL sort targets before constructing CommandState Created: 26/Mar/20  Updated: 29/Oct/23  Resolved: 27/Mar/20

Status: Closed
Project: Core Server
Component/s: Internal Code
Affects Version/s: None
Fix Version/s: 4.4.0-rc0, 4.7.0

Type: Bug Priority: Major - P3
Reporter: Cheahuychou Mao Assignee: Cheahuychou Mao
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.4
Sprint: Service Arch 2020-04-06
Participants:
Linked BF Score: 45

 Description   

The failpoint "networkInterfaceSendRequestsToTargetHostsInAlphabeticalOrder" currently sorts request.target after request has already been moved into cmdState. So at that point, it is sorting request.target and not cmdState->requestOnAny.target. In the case where request.target is not sorted in the beginning, the connection attached to the requestState will be different from the connection to the host attached to the state. That leads to incorrect behaviors including causing _killOperations to be sent to the wrong node (since the flag fulfilledPromise can be set on the wrong requestState).



 Comments   
Comment by Githook User [ 27/Mar/20 ]

Author:

{'email': 'cheahuychou.mao@mongodb.com', 'name': 'Cheahuychou Mao', 'username': 'cheahuychou'}

Message: SERVER-47141 Make failpoint in NetworkInterfaceTL sort targets before constructing CommandState

(cherry picked from commit bb67941a1ba9c04a58bc4cb74cfd02ec9f315024)
Branch: v4.4
https://github.com/mongodb/mongo/commit/fb589321addbe90d2fce49b515c70e911c1c9d25

Comment by Githook User [ 27/Mar/20 ]

Author:

{'email': 'cheahuychou.mao@mongodb.com', 'name': 'Cheahuychou Mao', 'username': 'cheahuychou'}

Message: SERVER-47141 Make failpoint in NetworkInterfaceTL sort targets before constructing CommandState
Branch: master
https://github.com/mongodb/mongo/commit/bb67941a1ba9c04a58bc4cb74cfd02ec9f315024

Generated at Thu Feb 08 05:13:24 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.