zeroshade commented on code in PR #1297:
URL: https://github.com/apache/arrow-adbc/pull/1297#discussion_r1393242531
##########
go/adbc/driver/snowflake/record_reader.go:
##########
@@ -567,6 +567,17 @@ func newRecordReader(ctx context.Context, alloc
memory.Allocator, ld gosnowflake
lastChannelIndex := len(chs) - 1
go func() {
+ // place this here so that we always clean up, but they can't
be in a
+ // separate goroutine. Otherwise we'll have a race condition
between
+ // the call to wait and the calls to group.Go to kick off the
jobs
+ // to perform the pre-fetching (GH-1283).
Review Comment:
We always call `group.Go` once above this goroutine in order to kick off the
first batch. In addition, if `group.Go` has never been called, `group.Wait`
will just return immediately.
Hmm, though re-reading the code. We probably could just place this after the
for loop and we don't need the defer. I'll update this
--
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]