Details
-
Bug
-
Resolution: Fixed
-
Major
-
7.0.0, 7.0.1, 7.0.2, 7.1.0
-
Untriaged
-
1
-
No
Description
The backend mechanism for keeping track of upserting brokenmapping is subjected to race condition. The flow is as follows:
- A new instance of mapping is inserted. c.needToSync is set to true
- {{ MapShaRefCounter}}'s upsertMapping is called
- It checks the needToSync variable, and unlocks prior to doing RPC to simple store
- Once RPC returns, it re-acquires mutex to c.needToSync
- Without ensuring that c.shaToMapping did not change underneath, it clears c.needToSync. It may introduce a situation where a new entry was added to c.shaToMapping but the flag was cleared without actually upserting it.