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

Race condition on _sessionCatalogSource in LogOpShardingHandler::commit

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 6.3.0-rc0
    • None
    • None
    • Fully Compatible

    Description

      The LogOpShardingHandler::commit method checks if the _sessionCatalogSource
       member from the `MigrationChunkClonerSourceLegacy` class is constructed, but that member may be in the process of being constructed (via the MigrationChunkClonerSourceLegacy::startClone method). This is a race condition because the check may succeed because the memory address for _sessionCatalogSource has some data written, but not all of the data may have been finished being written, so using it would be unsafe.

      Note that other methods in MigrationChunkClonerSource that do a similar check for if the sessionCatalgSource exists are not racy because they are assumed to be running after startClone is ran (which is the only method that constructs the _sessionCatalogSource).

       

      Attachments

        Activity

          People

            wenqin.ye@mongodb.com Wenqin Ye
            wenqin.ye@mongodb.com Wenqin Ye
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: