Skip to content

Commit

Permalink
factor: adjust threshold for health-based balance (#580)
Browse files Browse the repository at this point in the history
  • Loading branch information
djshow832 authored Jun 25, 2024
1 parent 95def88 commit 73e0b8a
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions pkg/balance/factor/factor_health.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,17 @@ var (
errDefinitions = []errDefinition{
{
// may be caused by disconnection to PD
// test with no connection: around 80
promQL: `sum(increase(tidb_tikvclient_backoff_seconds_count{type="pdRPC"}[1m])) by (instance)`,
failThreshold: 100,
// test with no connection in no network: around 80/m
// test with 100 connections in unstable network: [50, 135]/2m
promQL: `sum(increase(tidb_tikvclient_backoff_seconds_count{type="pdRPC"}[2m])) by (instance)`,
failThreshold: 50,
recoverThreshold: 10,
},
{
// may be caused by disconnection to TiKV
// test with no connection: regionMiss is around 1300, tikvRPC is around 40
promQL: `sum(increase(tidb_tikvclient_backoff_seconds_count{type=~"regionMiss|tikvRPC"}[1m])) by (instance)`,
// test with no connection in no network: regionMiss is around 1300/m, tikvRPC is around 40/m
// test with 100 connections in unstable network: [1000, 3300]/2m
promQL: `sum(increase(tidb_tikvclient_backoff_seconds_count{type=~"regionMiss|tikvRPC"}[2m])) by (instance)`,
failThreshold: 1000,
recoverThreshold: 100,
},
Expand Down

0 comments on commit 73e0b8a

Please sign in to comment.