Skip to content

fix: preserve custom snapshot metadata after compaction#131

Merged
nagraham merged 2 commits intomainfrom
fix/preserve-custom-snapshot-metadata
Mar 20, 2026
Merged

fix: preserve custom snapshot metadata after compaction#131
nagraham merged 2 commits intomainfrom
fix/preserve-custom-snapshot-metadata

Conversation

@vovacf201
Copy link
Copy Markdown
Collaborator

@vovacf201 vovacf201 commented Mar 18, 2026

Summary

Custom/non-standard snapshot metadata properties (e.g. pipeline-id) were silently dropped after compaction Read previous snapshot's non-standard properties and pass them through via set_snapshot_properties() on both RewriteFilesAction and OverwriteFilesAction Standard Iceberg summary keys (total-records, added-data-files, etc.) are still correctly recalculated by iceberg-rust — only custom keys are preserved

Changes

  • Added custom_snapshot_properties() helper and KNOWN_SNAPSHOT_SUMMARY_KEYS constant
  • Modified CommitManager::rewrite_files() and CommitManager::overwrite_files() to inject custom properties
  • Added end-to-end test and unit test for the filtering logic

Before
image-2026-03-13-11-47-18-896

After
Screenshot 2026-03-18 at 15 23 43

Summary
Custom/non-standard snapshot metadata properties (e.g. pipeline-id, bobsled.source-table) were silently dropped after compaction
Read previous snapshot's non-standard properties and pass them through via set_snapshot_properties() on both RewriteFilesAction and OverwriteFilesAction
Standard Iceberg summary keys (total-records, added-data-files, etc.) are still correctly recalculated by iceberg-rust — only custom keys are preserved

Changes
Added custom_snapshot_properties() helper and KNOWN_SNAPSHOT_SUMMARY_KEYS constant
Modified CommitManager::rewrite_files() and CommitManager::overwrite_files() to inject custom properties
Added end-to-end test and unit test for the filtering logic
Summary
Custom/non-standard snapshot metadata properties (e.g. pipeline-id, bobsled.source-table) were silently dropped after compaction
Read previous snapshot's non-standard properties and pass them through via set_snapshot_properties() on both RewriteFilesAction and OverwriteFilesAction
Standard Iceberg summary keys (total-records, added-data-files, etc.) are still correctly recalculated by iceberg-rust — only custom keys are preserved

Changes
Added custom_snapshot_properties() helper and KNOWN_SNAPSHOT_SUMMARY_KEYS constant
Modified CommitManager::rewrite_files() and CommitManager::overwrite_files() to inject custom properties
Added end-to-end test and unit test for the filtering logic
Copy link
Copy Markdown
Collaborator

@nagraham nagraham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@nagraham nagraham added this pull request to the merge queue Mar 20, 2026
Merged via the queue into main with commit b7fa87c Mar 20, 2026
5 checks passed
Copy link
Copy Markdown
Collaborator

@Li0k Li0k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks !

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.

3 participants