Skip to content

Commit

Permalink
executor: fix data race in the IndexNestedLoopHashJoin (#31731) (#31757)
Browse files Browse the repository at this point in the history
close #31467
  • Loading branch information
ti-srebot authored Apr 27, 2022
1 parent 14e3f6b commit fa1db5c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion executor/index_lookup_hash_join.go
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,9 @@ func (iw *indexHashJoinInnerWorker) run(ctx context.Context, cancelFunc context.
break
}
err := iw.handleTask(ctx, task, joinResult, h, resultCh)
if err != nil {
if err != nil && !task.keepOuterOrder {
// Only need check non-keep-outer-order case because the
// `joinResult` had been sent to the `resultCh` when err != nil.
joinResult.err = err
break
}
Expand Down

0 comments on commit fa1db5c

Please sign in to comment.