Skip to content

Commit

Permalink
executor: fix index_lookup_hash_join hang when used with limit (#35820)…
Browse files Browse the repository at this point in the history
… (#36098)

close #35638
  • Loading branch information
ti-srebot authored Jul 14, 2022
1 parent 1baedb9 commit 23ab34a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion executor/index_lookup_hash_join.go
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,10 @@ func (iw *indexHashJoinInnerWorker) run(ctx context.Context, cancelFunc context.
joinResult.err = errors.New("mockIndexHashJoinInnerWorkerErr")
})
if joinResult.err != nil {
resultCh <- joinResult
select {
case resultCh <- joinResult:
case <-ctx.Done():
}
return
}
// When task.keepOuterOrder is TRUE(resultCh != iw.resultCh), the last
Expand Down

0 comments on commit 23ab34a

Please sign in to comment.