Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SNOW-976500 Do not drop errors from chunk downloader starting #994

Merged
merged 1 commit into from
Dec 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion async.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,17 @@
if isMultiStmt(&respd.Data) {
if err = sc.handleMultiQuery(ctx, respd.Data, rows); err != nil {
rows.errChannel <- err
close(rows.errChannel)

Check warning on line 137 in async.go

View check run for this annotation

Codecov / codecov/patch

async.go#L137

Added line #L137 was not covered by tests
return err
}
} else {
rows.addDownloader(populateChunkDownloader(ctx, sc, respd.Data))
}
rows.ChunkDownloader.start()
if err = rows.ChunkDownloader.start(); err != nil {
rows.errChannel <- err
close(rows.errChannel)
return err
}

Check warning on line 147 in async.go

View check run for this annotation

Codecov / codecov/patch

async.go#L144-L147

Added lines #L144 - L147 were not covered by tests
rows.errChannel <- nil // mark query status complete
}
} else {
Expand Down
4 changes: 2 additions & 2 deletions monitoring.go
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,6 @@ func (sc *snowflakeConn) buildRowsForRunningQuery(
if err := sc.rowsForRunningQuery(ctx, qid, rows); err != nil {
return nil, err
}
rows.ChunkDownloader.start()
return rows, nil
err := rows.ChunkDownloader.start()
return rows, err
}
4 changes: 3 additions & 1 deletion rows.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,9 @@
return io.EOF
}
rows.ChunkDownloader = rows.ChunkDownloader.getNextChunkDownloader()
rows.ChunkDownloader.start()
if err := rows.ChunkDownloader.start(); err != nil {
return err
}

Check warning on line 222 in rows.go

View check run for this annotation

Codecov / codecov/patch

rows.go#L221-L222

Added lines #L221 - L222 were not covered by tests
}
return rows.ChunkDownloader.nextResultSet()
}
Expand Down
Loading