Skip to content

perf(crons): Prefetch active incident in clock tasks consumer - #123084

Open
wedamija wants to merge 1 commit into
danf/crons-prefetch-queriesfrom
danf/crons-prefetch-active-incident
Open

perf(crons): Prefetch active incident in clock tasks consumer#123084
wedamija wants to merge 1 commit into
danf/crons-prefetch-queriesfrom
danf/crons-prefetch-active-incident

Conversation

@wedamija

Copy link
Copy Markdown
Member

Removing one more query from #123067. Also relies on this branch

Removing one more query from #123067. Also relies on this branch
@wedamija
wedamija requested a review from a team as a code owner August 28, 2026 22:38
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Aug 28, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 00f9ed7. Configure here.

# Only a hit short-circuits: an incident can be opened part way through
# a batch, so a miss has to re-query.
if self._prefetched_active_incident is not None:
return self._prefetched_active_incident

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Stale incident cache reopens resolved issues

Medium Severity

A cached hit on active_incident is never invalidated. If a successful check-in resolves that incident while the batch is still running, later clock tasks still receive the prefetched MonitorIncident and dispatch occurrences that can reopen the already-resolved issue.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 00f9ed7. Configure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant