Skip to content

Commit

Permalink
cherry pick pingcap#24770 to release-5.0
Browse files Browse the repository at this point in the history
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
  • Loading branch information
ichn-hu authored and ti-srebot committed May 20, 2021
1 parent 41c0f17 commit e5785f5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions executor/memtable_reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion executor/memtable_reader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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}, ","))
}
Expand Down

0 comments on commit e5785f5

Please sign in to comment.