From e5785f52a9630b90d89d4663a3f15b756781ffd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=99=8E?= Date: Thu, 20 May 2021 22:44:22 +0800 Subject: [PATCH] cherry pick #24770 to release-5.0 Signed-off-by: ti-srebot --- executor/memtable_reader.go | 3 +++ executor/memtable_reader_test.go | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/executor/memtable_reader.go b/executor/memtable_reader.go index a5d39d1c7b21d..5850570456f3b 100644 --- a/executor/memtable_reader.go +++ b/executor/memtable_reader.go @@ -191,6 +191,9 @@ func fetchClusterConfig(sctx sessionctx.Context, nodeTypes, nodeAddrs set.String url = fmt.Sprintf("%s://%s%s", util.InternalHTTPSchema(), statusAddr, pdapi.Config) case "tikv", "tidb": url = fmt.Sprintf("%s://%s/config", util.InternalHTTPSchema(), statusAddr) + case "tiflash": + // TODO: support show tiflash config once tiflash supports it + return default: ch <- result{err: errors.Errorf("unknown node type: %s(%s)", typ, address)} return diff --git a/executor/memtable_reader_test.go b/executor/memtable_reader_test.go index efd7f331cb0e6..c81801856f6fe 100644 --- a/executor/memtable_reader_test.go +++ b/executor/memtable_reader_test.go @@ -170,7 +170,7 @@ func (s *testMemTableReaderSuite) TestTiDBClusterConfig(c *C) { // mock servers servers := []string{} - for _, typ := range []string{"tidb", "tikv", "pd"} { + for _, typ := range []string{"tidb", "tikv", "tiflash", "pd"} { for _, server := range testServers { servers = append(servers, strings.Join([]string{typ, server.address, server.address}, ",")) }