Skip to content

Conversation

@markstory
Copy link
Member

There are a few deletions stuck for projects because of failures in deleting grouphistory. When removing a project it is possible for groups to have history records that have prev_history references that aren't within the same 10000 record batch as their parent. This was not reproducible in tests because tests run within a transaction so all batches are removed in the same transaction.

By deleting history records by group we can ensure that constraints aren't violated. Most groups have fewer than 10k history records so we shouldn't hit query timeouts.

Fixes SENTRY-19BG

There are a few deletions stuck for projects because of failures in
deleting grouphistory. When removing a project it is possible for groups
to have history records that have `prev_history` references that aren't
within the same 10000 record batch as their parent. This was not
reproducible in tests because tests run within a transaction so all
batches are removed in the same transaction.

By deleting history records by group we can ensure that constraints
aren't violated. Most groups have fewer than 10k history records so we
shouldn't hit query timeouts.

Fixes SENTRY-19BG
@markstory markstory requested review from a team and armenzg August 27, 2024 17:22
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Aug 27, 2024
@markstory markstory merged commit 9a8a99a into master Sep 5, 2024
@markstory markstory deleted the fix-grouphistory-delete branch September 5, 2024 14:38
@github-actions github-actions bot locked and limited conversation to collaborators Sep 21, 2024
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.

4 participants