-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Replication
-
Labels:None
-
Fully Compatible
-
ALL
-
Repl 2019-04-22
-
10
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.