lua-resty-limit-traffic icon indicating copy to clipboard operation
lua-resty-limit-traffic copied to clipboard

Question about race condition in 'count' limiter ('not found' error)

Open xv-joosua-l opened this issue 4 years ago • 0 comments

Hello,

In this issue: https://github.com/openresty/lua-resty-limit-traffic/issues/23, it is mentioned that lines from 54 to 69 are for handling a race condition, which I suppose is the case when the 'not found' error is returned.

My question is that is it possible for line 56 or 61 to also return a 'not found' error? We are observing a lot of 'not found' errors in our logs. However, if it is expected to encounter these 'not found' errors with high traffic volumes, then I have no further questions.

In general, I would like to know more about the conditions under which the 'not found' error can happen. Isn't it a normal case that keys are sometimes not found in the dictionary? For example, because they were not initialized before.

Thank you in advance.

xv-joosua-l avatar Jul 26 '19 03:07 xv-joosua-l