Skip to content

Commit 73e0b8a

Browse files
authored
factor: adjust threshold for health-based balance (#580)
1 parent 95def88 commit 73e0b8a

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

pkg/balance/factor/factor_health.go

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,17 @@ var (
5858
errDefinitions = []errDefinition{
5959
{
6060
// may be caused by disconnection to PD
61-
// test with no connection: around 80
62-
promQL: `sum(increase(tidb_tikvclient_backoff_seconds_count{type="pdRPC"}[1m])) by (instance)`,
63-
failThreshold: 100,
61+
// test with no connection in no network: around 80/m
62+
// test with 100 connections in unstable network: [50, 135]/2m
63+
promQL: `sum(increase(tidb_tikvclient_backoff_seconds_count{type="pdRPC"}[2m])) by (instance)`,
64+
failThreshold: 50,
6465
recoverThreshold: 10,
6566
},
6667
{
6768
// may be caused by disconnection to TiKV
68-
// test with no connection: regionMiss is around 1300, tikvRPC is around 40
69-
promQL: `sum(increase(tidb_tikvclient_backoff_seconds_count{type=~"regionMiss|tikvRPC"}[1m])) by (instance)`,
69+
// test with no connection in no network: regionMiss is around 1300/m, tikvRPC is around 40/m
70+
// test with 100 connections in unstable network: [1000, 3300]/2m
71+
promQL: `sum(increase(tidb_tikvclient_backoff_seconds_count{type=~"regionMiss|tikvRPC"}[2m])) by (instance)`,
7072
failThreshold: 1000,
7173
recoverThreshold: 100,
7274
},

0 commit comments

Comments
 (0)