u70b3 commented on PR #2185: URL: https://github.com/apache/iceberg-rust/pull/2185#issuecomment-4885293298
Hi @glitchy, I added a few regression tests on the latest branch to cover the remaining correctness edge cases. The tests are in `crates/iceberg/src/transaction/overwrite.rs` and three of them currently fail with P0-level issues that I think need to be fixed before merging: **1. Overwrite drops delete-only manifests** (`test_overwrite_preserves_delete_only_manifests`) `OverwriteOperation::existing_manifest` filters with `has_added_files() || has_existing_files()`, so a manifest containing only `Deleted` entries is dropped. Previously removed files can reappear as live data. `FastAppendAction` already fixed the same issue in #2148; the overwrite path should reuse that logic. **2. Previously Deleted entries are rewritten as Existing** (`test_overwrite_preserves_previously_deleted_entries`) In `rewrite_manifest`, only `entry.is_alive() && deleted_file_paths.contains(...)` goes through `add_deleted_entry`. Entries already marked `Deleted` fall through to `add_existing_entry`, changing their status back to `Existing`. **3. Rewritten manifest uses current schema / default partition spec** (`overwrite.rs:225-226`) `ManifestWriterBuilder` is built from `table.metadata().current_schema()` and `default_partition_spec()`. After schema or partition evolution this can produce manifest metadata that does not match the original entries. Note: I also verified that **V1 overwrite does not fail on sequence numbers** (`test_overwrite_v1_delete`) — V1 entries are parsed with `sequence_number = Some(0)`, so `add_deleted_entry` works. That concern turned out to be a false positive. Happy to open a follow-up PR with fixes, or fold them into this branch if you prefer. -- 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]
