Skip to content

Commit 31d6d91

Browse files
authored
Merge pull request JanKaul#300 from arnaudbriche/prune-snapshot-log-during-exire-snapshots
Add snapshot-log pruning to ExpireSnapshots operation
2 parents 8bb6a99 + 011df8d commit 31d6d91

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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)