server: fix load leak (#15134)

This commit is contained in:
cfzjywxk
2020-03-04 22:18:16 +08:00
committed by GitHub
parent d259e90127
commit b712d020db

View File

@ -1124,6 +1124,8 @@ func (cc *clientConn) handleLoadData(ctx context.Context, loadDataInfo *executor
loadDataInfo.InitQueues()
loadDataInfo.SetMaxRowsInBatch(uint64(loadDataInfo.Ctx.GetSessionVars().DMLBatchSize))
loadDataInfo.StartStopWatcher()
// let stop watcher goroutine quit
defer loadDataInfo.ForceQuit()
err = loadDataInfo.Ctx.NewTxn(ctx)
if err != nil {
return err