From a00e6f7ffcb8e3261466dcf24fb259a25c710f0e Mon Sep 17 00:00:00 2001 From: wshwsh12 <793703860@qq.com> Date: Tue, 15 Nov 2022 14:17:34 +0800 Subject: [PATCH 1/2] mpp-chan-size --- store/copr/mpp.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/store/copr/mpp.go b/store/copr/mpp.go index 5c159bc355ab1..b75594e49177f 100644 --- a/store/copr/mpp.go +++ b/store/copr/mpp.go @@ -516,7 +516,7 @@ func (c *MPPClient) DispatchMPPTasks(ctx context.Context, variables interface{}, tasks: dispatchReqs, finishCh: make(chan struct{}), cancelFunc: cancelFunc, - respChan: make(chan *mppResponse, 4096), + respChan: make(chan *mppResponse), startTs: startTs, vars: vars, needTriggerFallback: needTriggerFallback, From 4740664097f92133050184d2e77d0a9c88dd0249 Mon Sep 17 00:00:00 2001 From: wshwsh12 <793703860@qq.com> Date: Mon, 21 Nov 2022 15:46:47 +0800 Subject: [PATCH 2/2] fix goleak in test --- telemetry/data_window_test.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/telemetry/data_window_test.go b/telemetry/data_window_test.go index 94146863ea9bd..0bd171caf3775 100644 --- a/telemetry/data_window_test.go +++ b/telemetry/data_window_test.go @@ -94,9 +94,11 @@ func TestTiflashUsage(t *testing.T) { require.Equal(t, telemetry.CurrentTiflashTableScanCount.String(), "0") require.Equal(t, telemetry.CurrentTiflashTableScanWithFastScanCount.String(), "0") - tk.MustExec("set session tidb_isolation_read_engines='tiflash';select count(*) from t") + tk.MustExec("set session tidb_isolation_read_engines='tiflash';") + tk.MustQuery(`select count(*) from t`) tk.MustExec(`set @@session.tiflash_fastscan=ON`) - tk.MustExec(`set session tidb_isolation_read_engines="tiflash";select count(*) from test.t`) + tk.MustExec(`set session tidb_isolation_read_engines="tiflash";`) + tk.MustQuery(`select count(*) from test.t`) tk.Session().Close() require.Equal(t, telemetry.CurrentTiflashTableScanCount.String(), "2")