Repository navigation
Conversation
Lets the unused-commit cleanup range-scan by date instead of walking the table in id order. Post-deployment, built concurrently.
Contributor
|
This PR has a migration; here is the generated SQL for for --
-- Raw SQL operation
--
DROP INDEX CONCURRENTLY IF EXISTS "sentry_comm_date_ad_740455_idx";
--
-- Create index sentry_comm_date_ad_740455_idx on field(s) date_added, id of model commit
--
CREATE INDEX CONCURRENTLY "sentry_comm_date_ad_740455_idx" ON "sentry_commit" ("date_added", "id"); |
wedamija
approved these changes
Nov 12, 2026
| ] | ||
|
|
||
| operations = [ | ||
| # AddIndex builds concurrently; a failed build leaves an invalid index that blocks a retry. |
Member
There was a problem hiding this comment.
Are you sure that our framework doesn't handle retries properly here?
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.
resolves INFRENG-1013
Adds a
(date_added, id)index tosentry_commitso the unused-commit cleanup can range-scan by date instead of walking the table in id order.The migration is post-deployment, so the index only exists once someone runs it by hand in each region. It drops the index name first because a failed concurrent build leaves an invalid index behind that would otherwise block the retry.