fallintoplace opened a new pull request, #1300: URL: https://github.com/apache/iceberg-go/pull/1300
Summary - add a no-replace rename path for Hadoop metadata publishes - use it when creating `v1.metadata.json` and when committing the next table metadata version - return `ErrTableAlreadyExists` for create races and `table.ErrCommitFailed` for commit races - add deterministic concurrent create/commit coverage where two writers publish the same metadata version Why Hadoop commits wrote metadata to a temp file, checked whether the final path existed, then used `Rename` to publish it. On local filesystems `os.Rename` replaces the destination, so another writer could win between the existence check and rename and then be overwritten by the later commit. The metadata file publish now fails if the final path already exists. `version-hint.text` stays best-effort after the metadata file is committed. Testing - go test ./catalog/hadoop -run 'TestHadoopCatalogTestSuite/(TestCreateTableConcurrentMetadataPublishConflict|TestCommitTableConcurrentMetadataPublishConflict|TestCommitTableConflictDetection)' -count=1 - go test ./io -run '^TestLocalFSRenameNoReplaceDoesNotOverwrite$' -count=1 - go test ./catalog/hadoop -count=1 - go test ./catalog/... -count=1 - go test ./io -count=1 - go run github.com/golangci/golangci-lint/v2/cmd/[email protected] run --timeout=10m ./catalog/hadoop/... - go run github.com/golangci/golangci-lint/v2/cmd/[email protected] run --timeout=10m ./io - git diff --check -- 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]
