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

executor: Fix query hang on hash aggregate operator #6982

Merged
merged 2 commits into from
Jul 4, 2018

Conversation

zz-jason
Copy link
Member

@zz-jason zz-jason commented Jul 4, 2018

What have you changed? (mandatory)

there can be a situation that the final worker of hash aggregate can be blocked in receiving from the finalResultHolderCh and the main thread blocked in receiving from the finalOutputCh, which is closed when final worker exits.

actually the final work should be able to detect the query is finished when receiving from the finalResultHolderCh, so I use a select to do the receiving work.

What are the type of the changes (mandatory)?

  • Bug fix (non-breaking change which fixes an issue)

How has this PR been tested (mandatory)?

  • unit test
  • explain test

@zz-jason
Copy link
Member Author

zz-jason commented Jul 4, 2018

/run-all-tests

Copy link
Member

@winoros winoros left a comment

Choose a reason for hiding this comment

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

LGTM
where is the added tests?

@zz-jason
Copy link
Member Author

zz-jason commented Jul 4, 2018

@XuHuaiyu @winoros and CC: @shenli

@zz-jason
Copy link
Member Author

zz-jason commented Jul 4, 2018

@winoros Test is on the tidb-private-test, no need to add

@shenli shenli added type/bugfix This PR fixes a bug. sig/execution SIG execution labels Jul 4, 2018
@winoros
Copy link
Member

winoros commented Jul 4, 2018

@zz-jason It can also improve the test coverage. Unit test doesn't cover receiveFinalResultHolder totally.

@zz-jason zz-jason added this to the 2.1 milestone Jul 4, 2018
@shenli
Copy link
Member

shenli commented Jul 4, 2018

LGTM

Copy link
Contributor

@XuHuaiyu XuHuaiyu left a comment

Choose a reason for hiding this comment

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

LGTM

@shenli
Copy link
Member

shenli commented Jul 4, 2018

I will merge this to save the CI.

@shenli shenli merged commit 5601c45 into pingcap:master Jul 4, 2018
@zz-jason zz-jason deleted the dev/fix-hash-agg branch July 4, 2018 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sig/execution SIG execution type/bugfix This PR fixes a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants