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

Pause before destruction of ARS in UpdateOneWithIdWithoutShardKeyWithMatch test

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.2.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • Hide

      Inserting a sleep(5) between the two successive calls to onCommandForPoolExecutor reproduces it.

      Show
      Inserting a sleep(5) between the two successive calls to onCommandForPoolExecutor reproduces it.
    • 45

      The issue here is that the ARS context is destroyed here after receiving the mocked response for the first command sent in the test, canceling the second pending request with CallbackCanceled. The

      The launchAsync future blocks indefinitely and doesn't return because the onCommandForPoolExecutor for second mock response is scheduled to be run on the main test thread.

      A simple fix for this is to introduce a failpoint in the code such that it is unpaused only after the second command is scheduled to be run on the mock interface.

            Assignee:
            abdul.qadeer@mongodb.com Abdul Qadeer
            Reporter:
            abdul.qadeer@mongodb.com Abdul Qadeer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: