Skip to content

Commit

Permalink
fix conflict
Browse files Browse the repository at this point in the history
Signed-off-by: guo-shaoge <shaoge1994@163.com>
  • Loading branch information
guo-shaoge committed Jul 12, 2022
1 parent 7495b06 commit b36794b
Showing 1 changed file with 4 additions and 18 deletions.
22 changes: 4 additions & 18 deletions 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 Expand Up @@ -582,24 +585,7 @@ func (iw *indexHashJoinInnerWorker) handleHashJoinInnerWorkerPanic(r interface{}
iw.wg.Done()
}

<<<<<<< HEAD
func (iw *indexHashJoinInnerWorker) handleTask(ctx context.Context, task *indexHashJoinTask, joinResult *indexHashJoinResult, h hash.Hash64, resultCh chan *indexHashJoinResult) error {
=======
func (iw *indexHashJoinInnerWorker) handleTask(ctx context.Context, task *indexHashJoinTask, joinResult *indexHashJoinResult, h hash.Hash64, resultCh chan *indexHashJoinResult) (err error) {
defer func() {
iw.memTracker.Consume(-iw.memTracker.BytesConsumed())
if task.keepOuterOrder {
if err != nil {
joinResult.err = err
select {
case <-ctx.Done():
case resultCh <- joinResult:
}
}
close(resultCh)
}
}()
>>>>>>> 87052dc2f... executor: fix index_lookup_hash_join hang when used with limit (#35820)
var joinStartTime time.Time
if iw.stats != nil {
start := time.Now()
Expand Down

0 comments on commit b36794b

Please sign in to comment.