Skip to content

fix(storage): bound snapshot cleanup records - #462

Merged
fewensa merged 1 commit into
mainfrom
agt/datalens-bound-snapshot-cleanup
Aug 16, 2026
Merged

fix(storage): bound snapshot cleanup records#462
fewensa merged 1 commit into
mainfrom
agt/datalens-bound-snapshot-cleanup

Conversation

@fewensa

@fewensa fewensa commented Aug 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • cap coverage v2 snapshot cleanup record generation per bucket
  • stop listing snapshot heads once the cleanup batch cap is reached
  • keep query-side latest snapshot lookup unchanged so read correctness and max-delta safeguards remain intact

Why

Production compaction can spend a long tick publishing many cleanup records from one old bucket. That delays hot bucket cleanup and leaves foreground queries hitting over-budget delta buckets. This change makes snapshot cleanup incremental so maintenance keeps rotating through buckets.

Verification

  • cargo fmt --check
  • cargo test -p datalens-storage --test maintenance test_compaction_coverage_index_v2 -- --nocapture
  • cargo test -p datalens-storage test_s3_background_operations_have_shorter_timeout -- --nocapture
  • cargo clippy -p datalens-storage --all-targets -- -D warnings

Safety

  • does not raise or disable max_delta_objects
  • does not skip coverage checks
  • does not delete objects without existing cleanup records
  • only batches cleanup publication work per tick

@fewensa
fewensa merged commit 830585e into main Aug 16, 2026
1 check passed
@fewensa
fewensa deleted the agt/datalens-bound-snapshot-cleanup branch August 16, 2026 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant