Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

conprof: disable profiling tiflash #184

Merged
merged 1 commit into from
Jun 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion component/conprof/http/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ func getProfileEstimateSize(component topology.Component) int {
case topology.ComponentTiKV:
return 200 * 1024 // profile size
case topology.ComponentTiFlash:
return 200 * 1024 // profile size
// TODO: remove this after TiFlash fix the profile bug.
return 0
}
return defaultProfileSize
}
Expand Down
4 changes: 4 additions & 0 deletions component/conprof/scrape/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,10 @@ func (m *Manager) startScrape(ctx context.Context, component topology.Component,
if !continueProfilingCfg.Enable {
return nil
}
// TODO: remove this after TiFlash fix the profile bug.
if component.Name == topology.ComponentTiFlash {
return nil
}
profilingConfig := m.getProfilingConfig(component)
httpCfg := m.config.Security.GetHTTPClientConfig()
addr := fmt.Sprintf("%v:%v", component.IP, component.Port)
Expand Down
5 changes: 4 additions & 1 deletion component/conprof/scrape/manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ func TestManager(t *testing.T) {
break
}
}
// TODO: remove this after support tiflash
require.True(t, list.Target.Component != topology.ComponentTiFlash)
require.True(t, found, fmt.Sprintf("%#v", list))
for _, ts := range list.TsList {
require.True(t, ts >= param.Begin && ts <= param.End)
Expand Down Expand Up @@ -130,7 +132,8 @@ func TestManager(t *testing.T) {

// test for GetCurrentScrapeComponents
comp := manager.GetCurrentScrapeComponents()
require.Equal(t, len(comp), len(components))
// TODO: update this after support tiflash
require.Equal(t, len(comp), len(components)-1)

// test for topology changed.
mockServer2 := testutil.CreateMockProfileServer(t)
Expand Down