-
Notifications
You must be signed in to change notification settings - Fork 502
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
Local reads via Stale Reads do not work #4627
Comments
@DanielZhangQD Can you help take a look? |
@Tema What are the labels for TiDB nodes? |
I don't see any. This is a problem. I expect operator to assign the same labels to TiDB as it does for TiKV nodes based on k8s "topology.kubernetes.io/zone" label (see log captured in the issue description) , so that we can leverage stale reads. |
There is no documentation at present, please refer to the example in the test: https://github.com/pingcap/tidb/pull/19212/files#diff-373f5578b8f362a364b50b0d01919a57da64c128547ca10d49df8ae422237c82R215 In addition, how to configure the TiKV labels, refer to: https://docs.pingcap.com/tidb/stable/schedule-replicas-by-topology-labels#configure-labels-based-on-the-cluster-topology |
Adding label for TiDB Pods is not supported yet. |
After the following PR landed and released, this issue can be fixed. |
Bug Report
What version of TiDB Operator are you using?
v1.3.5
TidbCluster kind v6.1.0
What did you do?
I try to perform local reads using Stale Reads described in https://docs.pingcap.com/tidb/stable/three-dc-local-read#perform-local-read-using-stale-read, but TIDB sends commands to all tikv across all zones.
What did you expect to see?
Per documentation it should send requests to TiKV in the same zone
I use the following PD config:
I also see that corresponding labels are assigned to TiKV nodes:
However, I don't see same labels assigned to TiDB nodes, hence the feature does not work.
The text was updated successfully, but these errors were encountered: