Skip to content

Commit

Permalink
address comment
Browse files Browse the repository at this point in the history
  • Loading branch information
XuHuaiyu committed Dec 7, 2021
1 parent 7ef28ab commit b0099f7
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions executor/join.go
Original file line number Diff line number Diff line change
Expand Up @@ -262,17 +262,19 @@ func (e *HashJoinExec) wait4BuildSide() (emptyBuild bool, err error) {
func (e *HashJoinExec) fetchBuildSideRows(ctx context.Context, chkCh chan<- *chunk.Chunk, doneCh <-chan struct{}) {
defer close(chkCh)
var err error
failpoint.Inject("issue30289", func(val failpoint.Value) {
if val.(bool) {
err = errors.Errorf("issue30289 build return error")
e.buildFinished <- errors.Trace(err)
return
}
})
for {
if e.finished.Load().(bool) {
return
}
chk := chunk.NewChunkWithCapacity(e.buildSideExec.base().retFieldTypes, e.ctx.GetSessionVars().MaxChunkSize)
err = Next(ctx, e.buildSideExec, chk)
failpoint.Inject("issue30289", func(val failpoint.Value) {
if val.(bool) {
err = errors.Errorf("issue30289 build return error")
}
})
if err != nil {
e.buildFinished <- errors.Trace(err)
return
Expand Down

0 comments on commit b0099f7

Please sign in to comment.