[SERVER-61538] Fail point can be disabled in disconnect_kills_cursors.js before load-balanced client fully disconnects Created: 16/Nov/21  Updated: 29/Oct/23  Resolved: 18/Nov/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 5.2.0

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

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Service Arch 2021-11-22
Participants:
Linked BF Score: 148
Story Points: 2

 Description   

In disconnect_kills_cursors.js, we have two client-connections to mongos, one of which is simulated to be load-balanced using the setClientIsFromLoadBalancer failpoint. We disconnect that load-balanced client from the server to ensure particular server behavior (in this case, cursor killing), when load-balanced clients disconnect. We then use the non-load-balanced connection to ensure the cursor opened by the load-balanced client has been killed and disable the failpoint.

 

However, it's possible for the non-load-balanced connection to disable the failpoint before the load-balanced client has finished disconnecting. If the fail-point is disabled before the client checks if it is from a load-balancer, it will never run the special load-balanced-client behavior we're testing for, because the fail-point is what we use to "spoof" clients into thinking they're load-balanced. We should remove this race by only disabling the failpoint after we've verified the client has fully disconnected by ensuring any behavior we're checking for has already occurred.  



 Comments   
Comment by Githook User [ 18/Nov/21 ]

Author:

{'name': 'George Wangensteen', 'email': 'george.wangensteen@mongodb.com', 'username': 'gewa24'}

Message: SERVER-61538 Ensure load-balanced client fully disconnects before FailPoint is disabled in disconnect_kills_cursors.js
Branch: master
https://github.com/mongodb/mongo/commit/e4b9f6263130f452bac36dcbe7d4f5c2513c7f88

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