client-go icon indicating copy to clipboard operation
client-go copied to clipboard

snapshot: set `ReplicaRead` to false when `ReplicaReadType` fallbacks to `ReplicaReadLeader` (#1663)

Open you06 opened this issue 6 months ago • 1 comments

Cherry pick #1663 to tidb-8.5


ref pingcap/tidb#61745

The replicaReadAdjuster can choose leader and follower replica after a request is created. When the request is created as a replica-read request but fallback to leader read by replicaReadAdjuster, we need to set the replica_read to false as well. Unless it can perform a meaningless read-index in leader and harm the performance.

Before this PR

image

Many read-index proposals.

image

This PR

image

Few read-index proposals.

image

you06 avatar Jun 20 '25 08:06 you06

@glorv @zyguan I pushed an empty commit to trigger CI and the LGTM tag is removed, so I need your approve again, thanks.

you06 avatar Jul 01 '25 08:07 you06

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: glorv, zyguan

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

ti-chi-bot[bot] avatar Jul 01 '25 11:07 ti-chi-bot[bot]

[LGTM Timeline notifier]

Timeline:

  • 2025-06-30 07:41:10.482232131 +0000 UTC m=+1294323.205411112: :ballot_box_with_check: agreed by glorv.
  • 2025-06-30 08:26:15.488228585 +0000 UTC m=+1297028.211407566: :ballot_box_with_check: agreed by zyguan.
  • 2025-07-01 08:14:49.995013009 +0000 UTC m=+1382742.718191985: :heavy_multiplication_x::repeat: reset by you06.
  • 2025-07-01 08:54:31.48545135 +0000 UTC m=+1385124.208630327: :ballot_box_with_check: agreed by glorv.
  • 2025-07-01 11:08:42.496982418 +0000 UTC m=+1393175.220161397: :ballot_box_with_check: agreed by zyguan.

ti-chi-bot[bot] avatar Jul 01 '25 11:07 ti-chi-bot[bot]