You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "dhruvarya-db (via GitHub)" <gi...@apache.org> on 2026/06/17 01:46:55 UTC

[PR] feat(transaction): default expiry to history.expire.* table properties [iceberg-rust]

dhruvarya-db opened a new pull request, #2664:
URL: https://github.com/apache/iceberg-rust/pull/2664

   ## Which issue does this PR close?
   
   - Part of #2145.
   
   ## What changes are included in this PR?
   
   Defaults snapshot expiry to the table's `history.expire.*` properties when the corresponding knob is not set explicitly, completing the default fallback that #2591 deferred (its `plan()` carried two `TODO`s for exactly this).
   
   - `TableProperties` gains three fields (and their consts/defaults), in the same shape as the existing `commit.retry.*` properties:
     - `history.expire.max-snapshot-age-ms` (default 5 days)
     - `history.expire.min-snapshots-to-keep` (default 1)
     - `history.expire.max-ref-age-ms` (default `i64::MAX`, i.e. never)
   - `ExpireSnapshotsAction::plan()` now mirrors Java `RemoveSnapshots`' constructor:
     - the age cutoff defaults to `now - max-snapshot-age-ms`, so age-based selection **always runs** even for an explicit-id-only call (only file cleanup, out of scope here, keys off an explicit id in Java);
     - `retain_last` defaults to `min-snapshots-to-keep`;
     - refs without their own `max_ref_age_ms` age out against `max-ref-age-ms` (default never).
   
   Defaults and names mirror Java's `TableProperties` (`MAX_SNAPSHOT_AGE_MS_DEFAULT = 5 days`, `MIN_SNAPSHOTS_TO_KEEP_DEFAULT = 1`, `MAX_REF_AGE_MS_DEFAULT = Long.MAX_VALUE`).
   
   ## Are these changes tested?
   
   Yes — unit tests in `expire_snapshots.rs` (27 total, up from 25). Two new tests cover the always-on default cutoff (a >5-day-old snapshot is expired with no args while a recent one is kept) and the `history.expire.min-snapshots-to-keep` floor (the whole chain is retained despite age). Explicit-id-only tests pin the cutoff off to isolate that behavior now that the default age path always runs. `public-api.txt` regenerated for the new public fields/consts; clippy and fmt are clean.
   


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] feat(transaction): default expiry to history.expire.* table properties [iceberg-rust]

Posted by "blackmwk (via GitHub)" <gi...@apache.org>.
blackmwk merged PR #2664:
URL: https://github.com/apache/iceberg-rust/pull/2664


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org