SLoeuillet opened a new pull request, #2079: URL: https://github.com/apache/iceberg-go/pull/2079
Fixes #2078 `vendedCredentialRefresher.loadFS` caches the FileIO it builds and shares it with every later caller, but built it with the first caller's `ctx`. The GCS filesystem keeps the context it is opened with, so once that `ctx` is cancelled, every later operation through the table fails with `context canceled`, even when called with a live context. A writer that scopes each commit to its own context (`context.WithTimeout`, cancelled on return) sees every commit after the first fail. Renewal and `prefixScopedIO` (which stores `ctx` and opens filesystems lazily) had the same issue. **Change:** build the cached IO from `context.WithoutCancel(ctx)`, which keeps values and drops cancellation. `fetchCreds` still honours `ctx`. **Tests:** two new tests register a filesystem that records its opening context and assert it outlives the caller's cancellation, for the table-wide cached IO (initial load and renewal) and for `prefixScopedIO`. Both fail without the fix. `make lint` is clean and `go test ./...` passes. Verified end to end against Lakekeeper v0.13.3 with a native GCS warehouse: without the fix, the second append on the same table fails with `context canceled`. It would be great to have this in 0.7.0 if an rc1 is cut. -- 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]
