zeroshade commented on code in PR #1151:
URL: https://github.com/apache/arrow-go/pull/1151#discussion_r3761341411
##########
arrow/flight/flightsql/driver/driver.go:
##########
@@ -100,6 +100,16 @@ func (r *Rows) releaseRecord() {
}
}
+func (r *Rows) sendRecord(ctx context.Context, record arrow.RecordBatch) bool {
+ select {
+ case r.recordChan <- record:
+ return true
+ case <-ctx.Done():
+ record.Release()
Review Comment:
This releases the record blocked in the send, but `Rows.Close` still leaks
the retained record already buffered in `recordChan`. `streamRecordset` calls
`Retain()` before sending, the channel has capacity one, and `Close` only
cancels and releases `currentRecord`; it never drains the channel. Please make
close/producer teardown release buffered records and cover the real
`Rows.Close` path with retained ownership rather than testing `sendRecord`
alone.
--
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]