CaptainAni187 opened a new pull request, #2109: URL: https://github.com/apache/iceberg-go/pull/2109
Closes #2108, the follow-up from #2095. - **View version log (the bug).** `view.MetadataBuilder.Build` appended `versionHistoryEntry` to `b.versionLog`, so every extra `Build()` added the entry again. It now appends to a copy. `TestBuild_DoesNotGrowVersionLog` builds three times and checks there is one entry each time and that the builder's own log stays empty; on main the second build already has two. - **Table snapshot log.** `updateSnapshotLog` wrote the pruned log back into `b.snapshotLog`. That didn't change any output, but it was a side effect of `Build()`. It is now `updatedSnapshotLog`, which returns the log instead, so `buildCommonMetadata` treats it like the metadata log. `TestSnapshotLogSkipsIntermediate` now also checks that the builder keeps both entries after a build and that a second build returns the same pruned log; on main the builder's log is pruned to one. - **`lastUpdatedMS`.** I kept it cached on the builder and added a comment saying why: repeated builds of the same changes report the same timestamp. `go test ./...` passes and `golangci-lint run` (v2.14.0) reports 0 issues. -- 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]
