Skip to content

Commit

Permalink
store: change the mpp response chan size to 0 (#39151)
Browse files Browse the repository at this point in the history
ref #34143
  • Loading branch information
wshwsh12 authored Nov 21, 2022
1 parent 028c5eb commit cdb2910
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion store/copr/mpp.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
6 changes: 4 additions & 2 deletions telemetry/data_window_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit cdb2910

Please sign in to comment.