-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Fully Compatible
The LogOpShardingHandler::commit method checks if the _sessionCatalogSource
member from the `MigrationChunkClonerSourceLegacy` class is constructed, but that member may be in the process of being constructed (via the MigrationChunkClonerSourceLegacy::startClone method). This is a race condition because the check may succeed because the memory address for _sessionCatalogSource has some data written, but not all of the data may have been finished being written, so using it would be unsafe.
Note that other methods in MigrationChunkClonerSource that do a similar check for if the sessionCatalgSource exists are not racy because they are assumed to be running after startClone is ran (which is the only method that constructs the _sessionCatalogSource).