ryanworl opened a new pull request, #1834: URL: https://github.com/apache/iceberg-go/pull/1834
## What `UpdateSpec.BuildUpdates` fenced spec evolution with `assert-last-assigned-partition-id` only. Two racing **remove-only** spec evolutions assign no new field ids, so both pass that assertion and both commit — last writer wins and the other spec change is silently lost. This adds the missing requirement: `AssertDefaultSpecID`, pinned to the base default spec id, whenever the default partition spec changes. ## Why Java parity: [`UpdateRequirements.forUpdateTable`](https://github.com/apache/iceberg/blob/master/core/src/main/java/org/apache/iceberg/UpdateRequirements.java) registers `AssertDefaultSpecID` whenever a `SetDefaultPartitionSpec` update is present, alongside the last-assigned-partition-id assertion. With this in place, the second of two concurrent remove-only evolutions fails `assert-default-spec-id` instead of clobbering the first. ## Tests - `TestUpdateSpecBuildChanges` now expects both requirements on add / remove / rename, with `assert-default-spec-id` pinning the base spec id. - `go test ./table/...` and `golangci-lint run` are clean. Made with [Cursor](https://cursor.com) -- 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]
