groupcache icon indicating copy to clipboard operation
groupcache copied to clipboard

fix: group.Set() not updating hot cache for all nodes

Open xWiiLLz opened this issue 1 year ago • 2 comments

When there are more than 2 nodes, the hotCache is never updated when using the Set() method. Added a test which triggers the bug (you can test it by removing the accompanying fix done in groupcache.go).

However, it does look to me like the hotCache param in the Set method is misleading: the hot caches are used even if the provided arg is false, which would then yield out-of-date values to the other nodes 🤔

xWiiLLz avatar Apr 16 '24 18:04 xWiiLLz

@thrawn01 You may want to incorporate this fix in your fork.

Baliedge avatar Nov 27 '24 15:11 Baliedge

I've created a new PR to fix this issue on the new repo https://github.com/groupcache/groupcache-go/pull/11

The correct thing to do is ALWAYS delete the updated key from the hotCache. See the PR for explanation.

thrawn01 avatar Dec 03 '24 01:12 thrawn01