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

Attach client strand before releasing the opCtx in AsyncCommandExecution tests

    XMLWordPrintable

Details

    • Fully Compatible
    • ALL
    • v5.2, v5.1, v5.0
    • Service Arch 2022-2-21
    • 15
    • 3

    Description

      The main thread in AsyncCommandExecution tests may attempt to release the opCtx owned by an instance of ExecutionContext (see here and here) while a worker thread is using the client strand to fulfill a promise. This would cause a data-race, as the thread that is releasing the opCtx does not have the client strand attached to it.

      We should reorganize the test so that the client strand is always attached to the thread that destroys the opCtx.

      Attachments

        Issue Links

          Activity

            People

              amirsaman.memaripour@mongodb.com Amirsaman Memaripour
              amirsaman.memaripour@mongodb.com Amirsaman Memaripour
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: