Diffusion Krita ea97d0bc790d

Fix ConcurrentMap::migrationInProcess() to handle initialization value (0)…

Authored by dkazakov on Aug 20 2019, 4:01 PM.

Description

Fix ConcurrentMap::migrationInProcess() to handle initialization value (0) properly

Job coordinator of the table may have three states:

  1. jobCoordinator == 0: the table was initialized, but no migration has ever been started for this table
  2. jobCoordinator > 1: a table migration is in progress right now. The caller should join *jobCoordinator to help finishing the migration.
  3. jobCoordinator == 1: the table migration has been finished. It means that the table doesn't have any values in it anymore.

The patch actually fixes the map to consider case 1 as a situation, when
there is no migration.

CCBUG:411081

Details

Committed
dkazakovSep 13 2019, 8:53 AM
Parents
R37:ad0ad410cbca: Mark broken unittests as broken in the stable branch
Branches
Unknown
Tags
Unknown