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

Ensure reshardingChangeStreamsMonitor's callback does not race with the main resharding donor thread

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.2.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Cluster Scalability
    • Fully Compatible
    • ALL
    • 200
    • None
    • 3
    • TBD
    • None
    • None
    • None
    • None
    • None
    • None

      The reshardingChangeStreamsMonitor's callback creates an operationContext from the 
      cancelableOpCtxFactory to update the state document. However, this call can race with the main run() thread of the donor here if abort was called.
       
      This issue isn't very common since the reshardingChangeSteamMonitor does take in a cancelToken from the donor/recipient and should interrupt its work if the cancelToken is cancelled. One solution would be to capture the factory object in the callback here.

            Assignee:
            kruti.shah@mongodb.com Kruti Shah
            Reporter:
            kruti.shah@mongodb.com Kruti Shah
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: