Skip to content

Add integration tests for snapshot expiration with refs#492

Open
cbb330 wants to merge 2 commits intolinkedin:mainfrom
cbb330:chbush/snapshot-expiration-refs-test
Open

Add integration tests for snapshot expiration with refs#492
cbb330 wants to merge 2 commits intolinkedin:mainfrom
cbb330:chbush/snapshot-expiration-refs-test

Conversation

@cbb330
Copy link
Collaborator

@cbb330 cbb330 commented Mar 10, 2026

Summary

  • Adds SnapshotExpirationRefsTest with 3 integration tests validating how Iceberg snapshot expiration interacts with tags and branches
  • Demonstrates that refs protect snapshots from expiration (compliance gap)
  • Validates that history.expire.max-ref-age-ms table property causes expire_snapshots to drop expired refs and their protected snapshots

Test plan

  • Tests pass locally with Java 17
  • CI passes

cbb330 added 2 commits March 10, 2026 10:52
Tests that validate how Iceberg snapshot expiration interacts with tags
and branches, demonstrating that refs protect snapshots from expiration
and that the `history.expire.max-ref-age-ms` table property can be used
to automatically expire refs and their protected snapshots.
Validates that expire_snapshots can break the snapshot ancestor chain on
a branch, causing fast-forward to fail. Sets up main at S1, branch blue
at S4 with 3 intermediate commits, then expires S2 and S3 so only S1
and S4 remain. Asserts fast-forward fails with "not an ancestor".
This is existing Iceberg behavior unrelated to max-ref-age-ms.
@cbb330 cbb330 force-pushed the chbush/snapshot-expiration-refs-test branch from 3a1fd2f to d347846 Compare March 10, 2026 22:16
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