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

Collection cloner can be destroyed with a scope guard active

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 4.1.11
    • None
    • Replication
    • None
    • Fully Compatible
    • ALL
    • Repl 2019-04-22
    • 10

    Description

      After the _finishCallback for the CollectionCloner is called, the cloner may be destroyed, so the code must avoid touching method variables after calling it. This is violated by the exit guard for _runQuery, since _runQuery can call _finishCallback.

      We should be able to avoid this by creating the onCompletionGuard now created in _runQuery in the lambda function which calls _runQuery, then using it instead of _finishCallback. The _finishCallback can be run in the guard after the current operations run in ON_BLOCK_EXIT, and the ON_BLOCK_EXIT can be removed.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: