From b712d020dbc3aacf3e7bbaeef415b5cd28472886 Mon Sep 17 00:00:00 2001 From: cfzjywxk Date: Wed, 4 Mar 2020 22:18:16 +0800 Subject: [PATCH] server: fix load leak (#15134) --- server/conn.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/conn.go b/server/conn.go index 7b0330c7d4..a5f81e9780 100644 --- a/server/conn.go +++ b/server/conn.go @@ -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