Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-61538

Fail point can be disabled in disconnect_kills_cursors.js before load-balanced client fully disconnects

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 5.2.0
    • None
    • None
    • None
    • Fully Compatible
    • ALL
    • Service Arch 2021-11-22
    • 148
    • 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.  

      Attachments

        Activity

          People

            george.wangensteen@mongodb.com George Wangensteen
            george.wangensteen@mongodb.com George Wangensteen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: