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

Make sure allDatabaseCloner completion callback runs on correct executor

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 4.3.3
    • None
    • Replication
    • None
    • Fully Compatible
    • Repl 2019-12-16
    • 0

    Description

      The fix for SERVER-44809 was wrong (and this ticket reverts that ticket). It appears what actually happens is the destruction of the lambda for the allDatabaseCloner runs asynchronously, on the cloner executor, after the future is made ready. This can result in execution of the finishCallback for the onCompletion guard being run on the cloner executor after we enter net->runUntil(), which results in the next attempt being scheduled too late.

      Destroying the onCompletion shared pointer in the lambda while holding the initial syncer mutex ensures the final destruction happens somewhere else, since at that point we know there are other references to the shared pointer (except in the shutdown case)

      Attachments

        Activity

          People

            matthew.russotto@mongodb.com Matthew Russotto
            matthew.russotto@mongodb.com Matthew Russotto
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: