fallintoplace opened a new pull request, #1325:
URL: https://github.com/apache/iceberg-go/pull/1325

   Summary
   
   - publish staged metadata by hard-linking into place instead of renaming 
over the target
   - use the same no-replace publish path for both CreateTable and CommitTable
   - add regression coverage that a rival metadata file wins without being 
overwritten
   
   Why
   
   CreateTable and CommitTable currently stage metadata to a temp file and then 
rename it into place. On POSIX, rename can replace an existing destination, so 
a concurrent writer that publishes the same metadata version first can still be 
overwritten by the loser.
   
   Using link(temp, final) keeps the publish step atomic while making an 
existing destination fail with ErrExist instead of being replaced.
   
   Testing
   
   - go test ./catalog/hadoop -run 
'TestHadoopCatalogTestSuite/(TestCreateTableDoesNotOverwriteConcurrentMetadataFile|TestCommitTableDoesNotOverwriteConcurrentMetadataFile|TestCommitTableConflictDetection|TestCommitTableNoOrphanedTempFiles|TestCreateTableAlreadyExists)$'
 -count=1
   - go test ./catalog/hadoop -count=1
   - go test ./catalog/... -count=1
   - go test ./... -run '^$' -count=1
   - go test ./io -count=1
   - go run github.com/golangci/golangci-lint/v2/cmd/[email protected] run 
--timeout=10m ./catalog/hadoop/...
   - 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]

Reply via email to