Skip to content

Commit

Permalink
executor: fix hash join panic after killing (pingcap#14712)
Browse files Browse the repository at this point in the history
  • Loading branch information
SunRunAway authored Feb 11, 2020
1 parent 750583c commit 0f7a3e8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion executor/join.go
Original file line number Diff line number Diff line change
Expand Up @@ -459,11 +459,12 @@ func (e *HashJoinExec) runJoinWorker(workerID uint, probeKeyColIdx []int) {
emptyProbeSideResult.chk = probeSideResult
e.probeChkResourceCh <- emptyProbeSideResult
}
// note joinResult.chk may be nil when getNewJoinResult fails in loops
if joinResult == nil {
return
} else if joinResult.err != nil || (joinResult.chk != nil && joinResult.chk.NumRows() > 0) {
e.joinResultCh <- joinResult
} else if joinResult.chk.NumRows() == 0 {
} else if joinResult.chk != nil && joinResult.chk.NumRows() == 0 {
e.joinChkResourceCh[workerID] <- joinResult.chk
}
}
Expand Down

0 comments on commit 0f7a3e8

Please sign in to comment.