Skip to content

chore(grouping): Clean up grouphash caching#108274

Merged
lobsterkatie merged 6 commits intomasterfrom
kmclb-clean-up-grouphash-caching
Feb 18, 2026
Merged

chore(grouping): Clean up grouphash caching#108274
lobsterkatie merged 6 commits intomasterfrom
kmclb-clean-up-grouphash-caching

Conversation

@lobsterkatie
Copy link
Member

This undoes the changes made in #104460 and #104537, which enabled us to experiment with expiry times for the caches we use for grouphashes during ingest. I'd hoped that leaving stuff in the cache longer would increase the hit rate, but as we can see from the graph below, it didn't really make any difference - all 3 expiry times (1, 2, and 5 minutes) had essentially identical hit rates.

image

At the same time, leaving things in the cache longer did (unsurprisingly) mean that we used more cache space by having more entries in the cache at any one time:

image

Clearly, using all of that space in the cache isn't worth it, so this PR removes the code letting expiry time be variable and switches to just using the smallest expiry time of 1 minute. It also removes the versioning of our cache values, because it only existed to allow us to switch from one set of experimental values to another. Finally, it removes the expiry_seconds tag from our metrics, since the value will no longer vary.

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Feb 13, 2026
@lobsterkatie lobsterkatie marked this pull request as ready for review February 13, 2026 23:17
@lobsterkatie lobsterkatie requested review from a team as code owners February 13, 2026 23:17
Copy link
Member

@yuvmen yuvmen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, gave yourself and the review an easy time with all those TODO notes, nice job 👍

@lobsterkatie lobsterkatie merged commit 857046c into master Feb 18, 2026
95 checks passed
@lobsterkatie lobsterkatie deleted the kmclb-clean-up-grouphash-caching branch February 18, 2026 23:17
JonasBa pushed a commit that referenced this pull request Feb 19, 2026
This undoes the changes made in #104460 and #104537, which enabled us to experiment with expiry times for the caches we use for grouphashes during ingest. I'd hoped that leaving stuff in the cache longer would increase the hit rate, but it didn't really make any difference - all 3 expiry times (1, 2, and 5 minutes) had essentially identical hit rates. (See PR for graph showing this.)

At the same time, leaving things in the cache longer did (unsurprisingly) mean that we used more cache space by having more entries in the cache at any one time. (PR also includes a graph showing this.)

Clearly, using all of that space in the cache isn't worth it, so this PR removes the code letting expiry time be variable and switches to just using the smallest expiry time of 1 minute. It also removes the versioning of our cache values, because it only existed to allow us to switch from one set of experimental values to another. Finally, it removes the `expiry_seconds` tag from our metrics, since the value will no longer vary.
mchen-sentry pushed a commit that referenced this pull request Feb 24, 2026
This undoes the changes made in #104460 and #104537, which enabled us to experiment with expiry times for the caches we use for grouphashes during ingest. I'd hoped that leaving stuff in the cache longer would increase the hit rate, but it didn't really make any difference - all 3 expiry times (1, 2, and 5 minutes) had essentially identical hit rates. (See PR for graph showing this.)

At the same time, leaving things in the cache longer did (unsurprisingly) mean that we used more cache space by having more entries in the cache at any one time. (PR also includes a graph showing this.)

Clearly, using all of that space in the cache isn't worth it, so this PR removes the code letting expiry time be variable and switches to just using the smallest expiry time of 1 minute. It also removes the versioning of our cache values, because it only existed to allow us to switch from one set of experimental values to another. Finally, it removes the `expiry_seconds` tag from our metrics, since the value will no longer vary.
cvxluo added a commit that referenced this pull request Mar 2, 2026
The cache expiry values were experimentally verified in #108274 to not need tuning (1, 2, and 5 minute TTLs all had identical hit rates). Hardcode the 60s TTL directly and remove the options.

Co-authored-by: Claude <noreply@anthropic.com>
cvxluo added a commit that referenced this pull request Mar 2, 2026
The cache expiry values were experimentally verified in #108274 to not need tuning (1, 2, and 5 minute TTLs all had identical hit rates). Hardcode the 60s TTL directly and remove the options.

Co-authored-by: Claude <noreply@anthropic.com>
cvxluo added a commit that referenced this pull request Mar 2, 2026
The cache expiry values were experimentally verified in #108274 to not need tuning (1, 2, and 5 minute TTLs all had identical hit rates). Hardcode the 60s TTL directly and remove the options.

Co-authored-by: Claude <noreply@anthropic.com>
cvxluo added a commit that referenced this pull request Mar 2, 2026
The cache expiry values were experimentally verified in #108274 to not need tuning (1, 2, and 5 minute TTLs all had identical hit rates). Hardcode the 60s TTL directly and remove the options.

Co-authored-by: Claude <noreply@anthropic.com>
cvxluo added a commit that referenced this pull request Mar 2, 2026
The cache expiry values were experimentally verified in #108274 to not need tuning (1, 2, and 5 minute TTLs all had identical hit rates). Hardcode the 60s TTL directly and remove the options.

Co-authored-by: Claude <noreply@anthropic.com>
cvxluo added a commit that referenced this pull request Mar 2, 2026
The cache expiry values were experimentally verified in #108274 to not need tuning (1, 2, and 5 minute TTLs all had identical hit rates). Hardcode the 60s TTL directly and remove the options.

Co-authored-by: Claude <noreply@anthropic.com>
cvxluo added a commit that referenced this pull request Mar 2, 2026
The cache expiry values were experimentally verified in #108274 to not
need tuning (1, 2, and 5 minute TTLs all had identical hit rates).
Hardcode the 60s TTL directly and remove the options.

Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions bot locked and limited conversation to collaborators Mar 6, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants