Repository navigation
Conversation
EscalatingGroupForecast.fetch only took ids, so it reloaded the Group from the db just to check should_detect_escalation(). That lookup was needed when the check took an organization behind a feature flag, the flag and org query were removed in #70443 but the group query stayed. Both callers already have the group, pass it through instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Avoid reloading the group just to check
should_detect_escalation()when fetching an escalation forecast, both callers already have it. The lookup was left over from when the check took an organization behind a flag (#70443).This runs for events on issues archived until escalating, roughly 30M times a week in post_process at ~2ms p50, around 17 hours of db time a week (ballpark, only a few sampled spans). Example trace, the
sentry_groupedmessageselect underprocess_snoozesis the one that goes away.