golang / groupcache

groupcache is a caching and cache-filling library, intended as a replacement for memcached in many cases.
Apache License 2.0
12.94k stars 1.39k forks source link

consistenthash.go doesn't have a "Remove" method #115

Open toli-belo opened 5 years ago

toli-belo commented 5 years ago

curious how you guys use consistenthash.go without the Remove method. Isn't the whole beauty in the ability to make some keys unavail by removing them from the "ring" /hash value list?

LiuNingqian commented 2 years ago

Hi, Has this issue been resolved?

thrawn01 commented 2 years ago

I'm trying to understand the use case here, you can effectively "remove" a peer by re-creating the hash with a new set of peers.

LiuNingqian commented 2 years ago

I'm trying to understand the use case here, you can effectively "remove" a peer by re-creating the hash with a new set of peers.

I also thought about the use case, but what I'm worried about is that if re-creating will change the old mapping peer.

thrawn01 commented 2 years ago

It can change the mapping peer, but removing a peer will also change the mapping peer.