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

Avoid deadlock when max-row-limit is hit #7606

Merged
merged 1 commit into from
Nov 8, 2016

Conversation

jsternberg
Copy link
Contributor

When the max-row-limit was hit, the goroutine reading from the results
channel would stop reading from the channel, but it didn't signal to the
sender that it was no longer reading from the results. This caused the
sender to continue trying to send results even though nobody would ever
read it and this created a deadlock.

Include an AbortCh on the ExecutionContext that will signal when
results are no longer desired so the sender can abort instead of
deadlocking.

@jsternberg jsternberg force-pushed the js-max-row-limit-block-fix branch 2 times, most recently from 40b66c3 to 66dcfc6 Compare November 8, 2016 16:32
@jsternberg jsternberg added this to the 1.1.0 milestone Nov 8, 2016
When the `max-row-limit` was hit, the goroutine reading from the results
channel would stop reading from the channel, but it didn't signal to the
sender that it was no longer reading from the results. This caused the
sender to continue trying to send results even though nobody would ever
read it and this created a deadlock.

Include an `AbortCh` on the `ExecutionContext` that will signal when
results are no longer desired so the sender can abort instead of
deadlocking.
@jsternberg jsternberg force-pushed the js-max-row-limit-block-fix branch from 66dcfc6 to 64c2d70 Compare November 8, 2016 19:15
Copy link
Contributor

@jwilder jwilder left a comment

Choose a reason for hiding this comment

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

Verified this fixes the issue for me locally.

@jsternberg jsternberg merged commit ee4d04d into master Nov 8, 2016
@jsternberg jsternberg deleted the js-max-row-limit-block-fix branch November 8, 2016 20:39
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.

2 participants