Two (all-too-easily) inverted checks are causing all undrained buckets to be evicted every on every bucket insert when there are more than 100 buckets. Drained buckets are never evicted.
I was reading the code and noticed it, but now I don't see ratelimiter.Memory used anywhere.
Testing this isn't pretty but I can do it if you'd like.
Two (all-too-easily) inverted checks are causing all undrained buckets to be evicted every on every bucket insert when there are more than 100 buckets. Drained buckets are never evicted.
I was reading the code and noticed it, but now I don't see
ratelimiter.Memory
used anywhere.Testing this isn't pretty but I can do it if you'd like.