-
-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
perf(issues): add pseudo-cache to test_frequency_rates in GroupSnooze #69939
Conversation
referrer_suffix="frequency_snoozes", | ||
)[self.group_id] | ||
|
||
# TTL is further into the future than it needs to be, but we'd rather over-estimate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TTL is further into the future than it needs to be
if we want the cacheing to be less aggressive shouldn't the ttl be less into the future?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It short-circuits to say that the threshold is not reached when the number is less than threshold, by extending the caching window further into the future we guarantee to be overcounting, rather then undercounting, while keeping the cache as long as possible.
OTOH, if we'd like to have short lived cache, that would work too. On expired cache it falls back to +inf sentinel value, and triggers Snuba query
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah i see now 👍🏼
Suspect IssuesThis pull request was deployed and Sentry observed the following issues:
Did you find this useful? React with a 👍 or 👎 |
Reducing unnecessary Snuba queries by only querying when Redis count reached.
Follows exactly same pattern as #69556