Skip to content

Commit 011df8d

Browse files
committed
Add snapshot-log pruning to ExpireSnapshots operation
1 parent 8bb6a99 commit 011df8d

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

iceberg-rust/src/catalog/commit.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -513,6 +513,10 @@ pub fn apply_table_updates(
513513
for id in snapshot_ids {
514514
metadata.snapshots.remove(&id);
515515
}
516+
517+
metadata
518+
.snapshot_log
519+
.retain(|e| metadata.snapshots.contains_key(&e.snapshot_id));
516520
}
517521
TableUpdate::RemoveSnapshotRef { ref_name } => {
518522
metadata.refs.remove(&ref_name);

0 commit comments

Comments
 (0)