diff --git a/pkg/frontend/load.go b/pkg/frontend/load.go index 7abfcc329ee43..7c8d2803360c8 100644 --- a/pkg/frontend/load.go +++ b/pkg/frontend/load.go @@ -1472,16 +1472,13 @@ func (mce *MysqlCmdExecutor) LoadLoop(load *tree.Load, dbHandler engine.Database wg.Wait() - //wait write to quit - handler.simdCsvWaitWriteRoutineToQuit.Wait() - /* - drain event channel - */ + drain event channel + */ quit := false for { select { - case ne = <- handler.simdCsvNotiyEventChan: + case ne = <- handler.simdCsvNotiyEventChan: default: quit = true } @@ -1498,6 +1495,9 @@ func (mce *MysqlCmdExecutor) LoadLoop(load *tree.Load, dbHandler engine.Database } } + //wait write to quit + handler.simdCsvWaitWriteRoutineToQuit.Wait() + //fmt.Printf("-----total row2col %s fillBlank %s toStorage %s\n", // handler.row2col,handler.fillBlank,handler.toStorage) //fmt.Printf("-----write batch %s reset batch %s\n",