sentry icon indicating copy to clipboard operation
sentry copied to clipboard

fix(deletion) Use a specialized deletion strategy for GroupHistory

Open markstory opened this issue 1 year ago • 0 comments

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 avatar Aug 27 '24 17:08 markstory