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

server/handler.go: Close the row iter in doQuery with the same context we run the query with. #699

Merged
merged 1 commit into from
Dec 28, 2021

Conversation

reltuk
Copy link
Contributor

@reltuk reltuk commented Dec 28, 2021

If a row iter implementation captures the |ctx| from RowIter() or Next() calls,
and that |ctx| is canceled before the Close() call happens, then the
implementation may return an error on the canceled context. It is better for
our existing implementations if the Close() calls happen with the same context
as RowIter() and Next().

…t we run the query with.

If a row iter implementation captures the |ctx| from RowIter() or Next() calls,
and that |ctx| is canceled before the Close() call happens, then the
implementation may return an error on the canceled context. It is better for
our existing implementations if the Close() calls happen with the same context
as RowIter() and Next().
Copy link
Contributor

@andy-wm-arthur andy-wm-arthur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@jennifersp jennifersp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good.

@reltuk reltuk merged commit d79bc0b into main Dec 28, 2021
@Hydrocharged Hydrocharged deleted the aaron/server-handler-close-row-iter-with-errgroup-ctx branch April 6, 2022 07:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants