n,,,[T3374] FIX: batch and commit the communication attachment vacuum - #2136
Merged
Conversation
The vacuum ran as inline code on the cron, deleting every match in one transaction. Once a busy week crossed the rolling 2-year cutoff it could no longer finish within the 300s limit, and each timeout discarded the work and retried the same slice — livelocking every scheduled action
Confidence Score: 4/5Expired direct attachments on communication jobs without wrapper records are not removed, so the cleanup cannot reliably reclaim all eligible storage. One actionable non-security failure remains in the attachment-vacuum path. Danielgergely stated that the next commit would address the issue, but the current Files Needing Attention: partner_communication/models/communication_job.py
What T-Rex did
|
- kept already existing & tested version, and only improve it slightly - removed unnecessary complexity
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.
The vacuum ran as inline code on the cron, deleting every match in one transaction. Once a busy week crossed the rolling 2-year cutoff it could no longer finish within the 300s limit, and each timeout discarded the work and retried the same slice — livelocking every scheduled action