Revanth14 opened a new pull request, #2140: URL: https://github.com/apache/iceberg-go/pull/2140
Follow-up to #2099, addressing the open review threads. ### Changes **Pin the concurrent-removal abort for copy-on-write** As noted in review, when a concurrent commit has already removed or rewritten a data file this copy-on-write commit also removes, the retry rebuild's `checkRemovedFiles` aborts with `ErrCommitDiverged` before any validator runs. That is our equivalent of Java's `failMissingDeletePaths()`. `TestCheckRemovedFiles_AbortsWhenRewriteTargetMissing` covers it at the producer level, but nothing tested it through `performCopyOnWriteDeletion`. The new `TestCopyOnWriteConflict_ConcurrentRemovalOfSameFileDiverges` stages a copy-on-write `Delete`/`Overwrite`, lets a concurrent copy-on-write delete rewrite the same file first, and expects `ErrCommitDiverged`. It runs over v2/v3, serializable/snapshot isolation, `Delete`/`Overwrite`, and rewritten/fully removed files. With the abort in `checkRemovedFiles` disabled, all 16 cases fail: - **snapshot isolation (8 cases):** the stale commit lands with no error, the same row-resurrection bug as #2090, triggered by a concurrent rewrite instead of a concurrent delete; - **serializable (8 cases):** the commit is rejected only as a retryable `ErrConflictingDataFiles`, not as `ErrCommitDiverged`. ### Note #2046 changes the same `removed` line (`filesToRewrite` → `entriesToRewrite []iceberg.ManifestEntry`). Whichever lands second needs to build `removed` from the entries' `DataFile()`; the compiler will flag it. ### Validation - `gofmt`, `go vet ./...`, `go test -race ./...` pass. - The new test fails in all 16 cases with the `checkRemovedFiles` abort disabled, and passes with it. -- 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]
