-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
In #537, a deadlock occurs because the reload operation blocks waiting for other reloads to complete. This is to batch the individual reloads through a blocking queue, which drains tasks as work is performed. Due to in-flight reloads being tracked by a secondary map, the triggering of a reload is performed with a map computation. This ensures that a stale reload does not insert outdated data by the entry being removed when the reload completes or the original entry was removed / modified. Due to a reload blocking on a map lock, when the batch completes the future's callback to remove the entry collides on the same map lock due to hashing. This causes the task queue to never be reduced to allow more work, so the reload holding the lock is stuck forever. Due to hash collisions, other usages of the map (like eviction) may collide and fully disrupt the cache from performing any more writes.
- Loading branch information
Showing
3 changed files
with
18 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters