fallintoplace opened a new pull request, #1782:
URL: https://github.com/apache/iceberg-go/pull/1782
## What changed
- Return cached partition writers before taking the factory mutex.
- Keep the locked recheck so concurrent cache misses still create one writer.
- Add a concurrent creation regression test and a focused cache-hit
benchmark.
## Benchmark
Apple M1 Pro, Go 1.26.3, 8 benchmark workers:
```text
before after
1 partition 139.5 ns/op 2.6 ns/op
8 partitions 146.7 ns/op 3.1 ns/op
128 partitions 152.3 ns/op 3.8 ns/op
```
All cases remain at 0 allocs/op.
## Testing
- `go test ./table`
- `go test -race ./table -run
TestRollingDataWriter/TestConcurrentGetOrCreateCreatesOneWriter -count=20`
- `go vet ./table`
- `golangci-lint run --timeout=10m ./table/...`
--
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]