Skip to content

chore(crons): When deleting checkins, skip marking them as pending deletion. - #120670

Merged
wedamija merged 2 commits into
masterfrom
danf/skip-mark-in-progress-checkin-deletions
Jul 27, 2026
Merged

chore(crons): When deleting checkins, skip marking them as pending deletion.#120670
wedamija merged 2 commits into
masterfrom
danf/skip-mark-in-progress-checkin-deletions

Conversation

@wedamija

@wedamija wedamija commented Jul 27, 2026

Copy link
Copy Markdown
Member

We often delete a lot of checkins in a short period of time when deleting monitors (whether directly, via deleting a project or an org). Before deletions, we mark all the rows as deletion in progress. This doubles the number of mutations we perform when deleting a cron, and there's no real need to do it in this case.

Ideally we'd also throttle these, but this is a simple way to cut the load of deletions by half.

…letion.

We often delete a lot of checkins in a short period of time when deleting monitors (whether directly, via deleting a project or an org). This doubles the number of mutations we perform when deleting a cron, and there's no real need to do it in this case.

Ideally we'd also throttle these, but this is a simple way to cut the load of deletions by half.
@wedamija
wedamija requested a review from a team July 27, 2026 16:54
@wedamija
wedamija requested review from a team as code owners July 27, 2026 16:54
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Jul 27, 2026
@wedamija
wedamija merged commit 4d1917b into master Jul 27, 2026
70 checks passed
@wedamija
wedamija deleted the danf/skip-mark-in-progress-checkin-deletions branch July 27, 2026 17:28
wedamija added a commit that referenced this pull request Jul 27, 2026
We sometimes see large spikes in deletions from crons, which cause cpu
spikes and pages. We don't need to delete these at full speed, so
throttle how quickly we delete them.

The downside of this method is that we'll keep the task hanging for
longer. It's a simpler approach though that rewriting the deletions
abstraction to be able to stop/start mid way through a whole delete, and
should solve our problem.

Related to #120670. We removed
updates from the deletions process here, which should also significantly
improve load.

<!-- Describe your PR 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.

2 participants