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: getNewJoinResult after handling a task for orderd IndexHashJoin #13451

Merged
merged 5 commits into from
Nov 19, 2019

Conversation

XuHuaiyu
Copy link
Contributor

What problem does this PR solve?

fix #13449

What is changed and how it works?

This bug will only be triggered when IndexHashJoin needs to keep the outer order.

  1. After handling a task, the inner worker will return the join result back to the main thread and fetch another task WITHOUT getNewJoinResult.
  2. The chkResourceCh will be FULL at the moment.
  3. The main thread will be BLOCKED when try to send the result chk, which is fetched in step 1, back to the corresponding chkResourceCh.
  4. The inner worker will be BLOCKED when try to send a new join result to the main thread because there is no one wait on the result channel.

Check List

Tests

  • Integration test

Code changes

  • Has exported function/method change

Side effects

N/A

Related changes

N/A

Release note

N/A

@XuHuaiyu XuHuaiyu added type/bugfix This PR fixes a bug. sig/execution SIG execution labels Nov 14, 2019
@codecov
Copy link

codecov bot commented Nov 14, 2019

Codecov Report

Merging #13451 into master will not change coverage.
The diff coverage is n/a.

@@             Coverage Diff             @@
##             master     #13451   +/-   ##
===========================================
  Coverage   80.2545%   80.2545%           
===========================================
  Files           472        472           
  Lines        115014     115014           
===========================================
  Hits          92304      92304           
  Misses        15458      15458           
  Partials       7252       7252

cancelFunc()
return
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it better to put it in doJoinInOrder or handleTask?

Copy link
Contributor

Choose a reason for hiding this comment

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

How about putting it here, the first defer function in doJoinInOrder?

Copy link
Contributor

@wshwsh12 wshwsh12 left a comment

Choose a reason for hiding this comment

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

LGTM

@wshwsh12 wshwsh12 added the status/LGT1 Indicates that a PR has LGTM 1. label Nov 18, 2019
@qw4990 qw4990 removed their request for review November 19, 2019 06:12
Copy link
Contributor

@lzmhhh123 lzmhhh123 left a comment

Choose a reason for hiding this comment

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

LGTM

@lzmhhh123 lzmhhh123 added status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Nov 19, 2019
@sre-bot
Copy link
Contributor

sre-bot commented Nov 19, 2019

Your auto merge job has been accepted, waiting for 13561

@sre-bot
Copy link
Contributor

sre-bot commented Nov 19, 2019

/run-all-tests

@sre-bot sre-bot merged commit 1d4ac09 into pingcap:master Nov 19, 2019
XiaTianliang pushed a commit to XiaTianliang/tidb that referenced this pull request Dec 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sig/execution SIG execution status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2. type/bugfix This PR fixes a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

indexNestedLoopHashJoin hang in doJoinInOrder
6 participants