Revanth14 opened a new pull request, #2099: URL: https://github.com/apache/iceberg-go/pull/2099
Fixes #2090. Copy-on-write `Delete` and `Overwrite` could resurrect deleted rows. If a concurrent writer added deletes against a data file the operation removes, and commit retries were enabled, refresh-and-replay committed the stale rewrite without checking those deletes. `performCopyOnWriteDeletion` now registers `validateNoNewDeletesForRewrittenFiles` over every data file it removes, both rewritten and fully dropped, at every isolation level. This matches Java's `validateNoConflictingDeletes` for copy-on-write. Conflicting commits now fail with `ErrConflictingDeleteFiles`. Because `Delete` (copy-on-write mode) and `Overwrite` share this path, both are covered. ### Conservative rejection (existing validator behavior, unchanged here) - A position delete that doesn't identify a single target file falls back to a `(spec, partition)` match. On v2, a concurrent position delete against a *different* file in the same partition can therefore reject the commit. Java's `DeleteFileIndex` falls back the same way. - Any concurrent equality delete is rejected, whatever partition it touches. This is stricter than Java; the validator's doc comment already notes the planned follow-up to narrow it. ### Tests `table/cow_delete_conflict_test.go`: - 16 conflict cases: format v2/v3 × serializable/snapshot isolation × `Delete`/`Overwrite` × rewritten/fully removed file. A concurrent merge-on-read delete commits first; the copy-on-write commit must fail with `ErrConflictingDeleteFiles`. - 8 controls: the same matrix with a concurrent append instead; the copy-on-write commit must replay and succeed with both changes applied. -- 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]
