From af3c0f91c2ec84545a35472afb6df12968d6aaf3 Mon Sep 17 00:00:00 2001 From: Ran Date: Tue, 25 Feb 2020 11:00:43 +0800 Subject: [PATCH 1/4] reference/performance: correct replica selection policy of follower read --- reference/performance/follower-read.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reference/performance/follower-read.md b/reference/performance/follower-read.md index 91a27a3feec73..c952cfe1af35b 100644 --- a/reference/performance/follower-read.md +++ b/reference/performance/follower-read.md @@ -47,4 +47,4 @@ When the follower node processes a read request, it first uses `ReadIndex` of th ### Follower replica selection strategy -Because the Follower Read feature guarantees linearizability without affecting Snapshot Isolation, TiDB adopts the round-robin strategy to select the follower replica. Although TiKV can select any follower replica to handle any read request, considering the different replication speed among followers, if the load balancing granularity is too fine, it might cause significant fluctuation of latency. Currently, the granularity of the Follower Read load balancing policy is at the connection level. For a TiDB client connected to a specific Region, the selected follower is fixed, and is switched only when it fails or the scheduling policy is adjusted. +Because the Follower Read feature guarantees linearizability without affecting Snapshot Isolation, TiDB adopts the round-robin strategy to select the follower replica. Currently, the granularity of the Follower Read load balancing policy is at the transaction level. For a TiDB transaction on a specific Region, the selected follower is fixed, and is switched only when it fails or the scheduling policy is adjusted. From 6318c8268e66a5dcde95f85685fa7bddf0d8c5c2 Mon Sep 17 00:00:00 2001 From: Ran Date: Wed, 26 Feb 2020 16:32:48 +0800 Subject: [PATCH 2/4] sync with docs-cn changes https://github.com/pingcap/docs-cn/pull/2311 --- reference/performance/follower-read.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reference/performance/follower-read.md b/reference/performance/follower-read.md index c952cfe1af35b..0cb0bcb4808e8 100644 --- a/reference/performance/follower-read.md +++ b/reference/performance/follower-read.md @@ -47,4 +47,4 @@ When the follower node processes a read request, it first uses `ReadIndex` of th ### Follower replica selection strategy -Because the Follower Read feature guarantees linearizability without affecting Snapshot Isolation, TiDB adopts the round-robin strategy to select the follower replica. Currently, the granularity of the Follower Read load balancing policy is at the transaction level. For a TiDB transaction on a specific Region, the selected follower is fixed, and is switched only when it fails or the scheduling policy is adjusted. +Because the Follower Read feature guarantees linearizability without affecting Snapshot Isolation, TiDB adopts the round-robin strategy to select the follower replica. Currently, for the coprocessor requests, the granularity of the Follower Read load balancing policy is at the connection level. For a TiDB connection on a specific Region, the selected follower is fixed, and is switched only when it fails or the scheduling policy is adjusted. Conversely, for the non-coprocessor requests, such as a point query, the granularity of the Follower Read load balancing policy is at the transaction level. For a TiDB transaction on a specific Region, the selected follower is fixed, and is switched only when it fails or the scheduling policy is adjusted. From 315ac3a0ffaa281d3294a0e2fa4ebc37a2cd8f5d Mon Sep 17 00:00:00 2001 From: Ran Date: Wed, 26 Feb 2020 17:00:27 +0800 Subject: [PATCH 3/4] Update reference/performance/follower-read.md Co-Authored-By: Keke Yi <40977455+yikeke@users.noreply.github.com> --- reference/performance/follower-read.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/reference/performance/follower-read.md b/reference/performance/follower-read.md index 0cb0bcb4808e8..d2acd9bd4e320 100644 --- a/reference/performance/follower-read.md +++ b/reference/performance/follower-read.md @@ -47,4 +47,6 @@ When the follower node processes a read request, it first uses `ReadIndex` of th ### Follower replica selection strategy -Because the Follower Read feature guarantees linearizability without affecting Snapshot Isolation, TiDB adopts the round-robin strategy to select the follower replica. Currently, for the coprocessor requests, the granularity of the Follower Read load balancing policy is at the connection level. For a TiDB connection on a specific Region, the selected follower is fixed, and is switched only when it fails or the scheduling policy is adjusted. Conversely, for the non-coprocessor requests, such as a point query, the granularity of the Follower Read load balancing policy is at the transaction level. For a TiDB transaction on a specific Region, the selected follower is fixed, and is switched only when it fails or the scheduling policy is adjusted. +Because the Follower Read feature guarantees linearizability without affecting Snapshot Isolation, TiDB adopts the round-robin strategy to select the follower replica. Currently, for the coprocessor requests, the granularity of the Follower Read load balancing policy is at the connection level. For a TiDB client connected to a specific Region, the selected follower is fixed, and is switched only when it fails or the scheduling policy is adjusted. + +However, for the non-coprocessor requests, such as a point query, the granularity of the Follower Read load balancing policy is at the transaction level. For a TiDB transaction on a specific Region, the selected follower is fixed, and is switched only when it fails or the scheduling policy is adjusted. From a4d14dfbbd0e2f64c5c64e9f53e23af7c839145b Mon Sep 17 00:00:00 2001 From: Ran Date: Wed, 26 Feb 2020 17:36:15 +0800 Subject: [PATCH 4/4] deleted a trailing space --- reference/performance/follower-read.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reference/performance/follower-read.md b/reference/performance/follower-read.md index d2acd9bd4e320..6872b3ca5f8c4 100644 --- a/reference/performance/follower-read.md +++ b/reference/performance/follower-read.md @@ -47,6 +47,6 @@ When the follower node processes a read request, it first uses `ReadIndex` of th ### Follower replica selection strategy -Because the Follower Read feature guarantees linearizability without affecting Snapshot Isolation, TiDB adopts the round-robin strategy to select the follower replica. Currently, for the coprocessor requests, the granularity of the Follower Read load balancing policy is at the connection level. For a TiDB client connected to a specific Region, the selected follower is fixed, and is switched only when it fails or the scheduling policy is adjusted. +Because the Follower Read feature guarantees linearizability without affecting Snapshot Isolation, TiDB adopts the round-robin strategy to select the follower replica. Currently, for the coprocessor requests, the granularity of the Follower Read load balancing policy is at the connection level. For a TiDB client connected to a specific Region, the selected follower is fixed, and is switched only when it fails or the scheduling policy is adjusted. However, for the non-coprocessor requests, such as a point query, the granularity of the Follower Read load balancing policy is at the transaction level. For a TiDB transaction on a specific Region, the selected follower is fixed, and is switched only when it fails or the scheduling policy is adjusted.