-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes a concurrency error in groupcache. Previously, multiple Get
requests could simultaneously result in a load(). Only requests that enter singleflight Do concurrently would be deduped, so it was possible for populateCache to be called multiple times for the same key. That would result in overcounting nbytes, and eventually leading to a livelock where nbytes > cacheBytes, but there were no entries in the cache. Change-Id: I5b304ce82041c1310c31b662486744e86509cc53
- Loading branch information
1 parent
604ed57
commit d995f8a
Showing
2 changed files
with
115 additions
and
1 deletion.
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