Open Tema opened 2 years ago
@DanielZhangQD Can you help take a look?
@Tema What are the labels for TiDB nodes?
@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.
@Tema What are the labels for TiDB nodes?
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. https://github.com/pingcap/tidb/pull/36845 https://github.com/pingcap/tidb-operator/pull/4663
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.