What does it mean when a buffer.revoked message is sent?

I tried to look into the source code and attempt to figure it out, but I could not understand what it means when Sentry emits the ${prefix}.buffer.revoked message to statsd.

Could I have help understanding what the metric means?

What happens when the metric is buffer.revoked.empty? Does it mean that Redis has LRU expired my keys?

What does buffer.revoked.locked mean? Does it mean that the entry in Redis can not be accessed by multiple celery workers at the same time?

It’s easiest to just look at what the code is doing:

I did read through this code, but I could not figure out how exactly it works in any measure of certainty.

the “locked” reason means “its already processing another increment for the same key”

the “empty” reason seems like an LRU or some other unexpected issue

If you’re seeing either of this it could be an indicator of lacking capacity.

1 Like

That is the impression that I got too! Thanks for validating!