Revanth14 opened a new pull request, #2192: URL: https://github.com/apache/iceberg-go/pull/2192
## Problem The `PlanIO` doc says `Scan.Close` "waits for active ReadTasks iterators before the plan IO is closed". It doesn't: `Close` drops the scan's owner lease and returns. An active iterator holds a reader lease, and the plan IO closes when the last lease is released. `Scan.Close`'s own doc already describes this correctly; the two disagreed. `TestScanCloseWaitsForActiveReadTasks` repeated the wrong claim in its name. It called `Close` in a goroutine with a buffered result channel, so it passed without anything waiting. ## Fix - Reword the `PlanIO` doc to match `Scan.Close`: `Close` is idempotent and does not wait; active iterators keep the plan IO open until the last one finishes. - Rename the test to `TestScanCloseKeepsPlanIOOpenForActiveReadTasks` and call `Close` synchronously. If `Close` ever blocked on readers, the test would deadlock instead of passing. No behavior change. ## Testing `go test -race ./table/` passes. Making `releaseOwner` close the IO even with a reader still active fails the renamed test (`the active iterator still holds the plan IO`). -- 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]
