Collection cloner can be destroyed with a scope guard active

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 4.1.11
    • Affects Version/s: None
    • Component/s: Replication
    • None
    • Fully Compatible
    • ALL
    • Repl 2019-04-22
    • 10
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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.

            Assignee:
            Matthew Russotto (Inactive)
            Reporter:
            Matthew Russotto (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: