Leaky bucket updates the key when reading
grosser opened this issue · 9 comments
This seems unnecessary ... @shanitang can you fix that ?
yes
https://github.com/zendesk/prop/blob/master/lib/prop/limiter.rb#L120-L130 We use @strategy.conter
in limiter to return the current hits, and that's why it updates the key when counter is called. Does it make sense?
it does not make sense to me to write/update the counter when I want to know what the current count is ... that should just be a read ...
Does that mean we should just read the current count and return it even if the number is not the real count for the moment?
read it, calculate the real number and return that ?
thx! :D
On Mon, Oct 19, 2015 at 2:55 PM, Yeu Shuan Tang notifications@github.com
wrote:
ok! I'll update it! Thanks @grosser https://github.com/grosser
—
Reply to this email directly or view it on GitHub
#9 (comment).