Skip to content

fix: keep frozen artifact metadata consistent during merges - #17

Merged
juhop-code merged 2 commits into
mainfrom
fix/freeze-snapshot-metadata
Oct 29, 2026
Merged

juhop-code merged 2 commits into
mainfrom
fix/freeze-snapshot-metadata

Conversation

@juhop-code

Copy link
Copy Markdown
Contributor

Summary

Keep worker output metadata consistent with the frozen artifact when background aggregation reduces parts and rows. Both rewrite and compaction now stop merge selection and drain in-flight merges before measurement and FREEZE.

Changes

  • Fail safely if a stable snapshot cannot be established; restore merges on success, failure and cancellation.
  • Use a separate bounded drain deadline, independent of the ordinary merge optimization budget.
  • Preserve all E2E log assertions by reading the Docker log-driver stream until worker exit.

Testing

  • Formatting, go mod tidy, go vet ./..., go test ./... and rewrite race tests pass.
  • Full E2E passed with ClickHouse 26.6 and 26.9-posthog, matching the CI matrix.
  • Regression coverage includes aggregate row reduction, draining, timeout/error cleanup and cancellation.

@juhop-code
juhop-code merged commit dd6b03a into main Oct 29, 2026
11 checks passed
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