AnirudhSriram opened a new issue, #2421:
URL: https://github.com/apache/iceberg-go/issues/2421
### Apache Iceberg version
main (development)
### Please describe the bug 🐞
On a v2 table with `write.delete.mode=merge-on-read`, `Transaction.Delete`
writes position deletes for rows that an earlier position delete already
removed.
`makePositionDeleteRecordsForFilter` builds its `FileScanTask`s as `{File,
Start, Length}` without `DeleteFiles`, so `readAllDeleteFiles` finds no delete
files and every row matching the filter gets a new position delete, including
rows that are already deleted.
The table data stays correct (the duplicate deletes point at rows that are
already gone), but:
- each update of a row adds another position delete for every earlier
version of it, so delete files keep growing;
- the snapshot summary's `added-position-deletes` / `total-position-deletes`
overcount.
v3 tables are not affected: the deletion vector path merges with the
existing bitmap.
Repro:
1. Create a v2 table with merge-on-read deletes and append ids 1, 2, 3.
2. Delete `id = 1`.
3. Delete `id IN (1, 2)`.
Expected `added-position-deletes = 1` in the last snapshot; actual is `2`.
We hit this on a live table: one update batch wrote 5 position deletes where
3 were correct.
### Willingness to contribute
I can contribute a fix for this bug independently.
--
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]