Branch reviewed: s3
Problem
Retention logic fetches all successful backup logs and old logs without explicit limits, which can degrade sharply as history grows.
Evidence (file + line)
aws_integration/aws_integration/s3/backup.py#L540
aws_integration/aws_integration/s3/backup.py#L563
- Related candidate generation path:
aws_integration/aws_integration/s3/backup.py#L104
Risk / impact
- Full-table scans and large in-memory lists in maintenance jobs.
- Longer backup windows and higher DB pressure.
- Increased timeout risk on large installations.
Replication suggestion
- Seed
S3 Backup Log with high row count (e.g., 100k+ success logs).
- Run backup rotation.
- Measure query time/memory and job duration.
Resolution suggestion
- Query only required columns and bounded windows.
- Use retention-count based slicing via SQL with limits.
- For retention-days, delete in paginated batches using indexed fields (
completed_at, status).
- Consider server-side delete query strategy to avoid loading all names into Python sets.
Acceptance criteria
Branch reviewed:
s3Problem
Retention logic fetches all successful backup logs and old logs without explicit limits, which can degrade sharply as history grows.
Evidence (file + line)
aws_integration/aws_integration/s3/backup.py#L540aws_integration/aws_integration/s3/backup.py#L563aws_integration/aws_integration/s3/backup.py#L104Risk / impact
Replication suggestion
S3 Backup Logwith high row count (e.g., 100k+ success logs).Resolution suggestion
completed_at,status).Acceptance criteria