drbothen opened a new pull request, #2146: URL: https://github.com/apache/iceberg-rust/pull/2146
## Which issue does this PR close? - Closes #2145 - Ref #1454, #884 ## What changes are included in this PR? Adds `ExpireSnapshotsAction` to the transaction API, enabling removal of old snapshots from table metadata. Key features: - **Explicit expiry**: Expire specific snapshot IDs via `expire_snapshot_ids()` - **Age-based expiry**: Expire snapshots older than a timestamp via `expire_older_than_ms()` - **Safety guarantees**: Current snapshot is never expired; `retain_last(n)` ensures a minimum number of snapshots survive - **File cleanup utility**: `find_unreferenced_files()` identifies data files, manifests, and manifest lists that are only referenced by expired snapshots and can be safely deleted after commit The action returns a `RemoveSnapshots` table update and does NOT delete physical files directly, following the Iceberg principle of metadata-first operations. ## Are these changes tested? Yes — 5 unit tests covering: - Current snapshot protection - Age-based expiry - `retain_last` enforcement - No-op when nothing to expire - `find_unreferenced_files` with carried-forward files -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
