How does PD detect new TiKV nodes during scaling? When is the store ID created?

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: 扩容时新的tikv节点是如何被pd感知的? store id 什么时候被创建的?

| username: TiDBer_i9JTZs9v

When using tiup to scale out TiKV, it seems that only tikv-server is deployed, and there are no operations related to changing metadata. So how is TiKV detected by PD? If it is reported through an RPC interface, which RPC interface is it?

| username: Soysauce520 | Original post link

There are detailed process logs during scaling. The metadata of PD will be modified.

| username: Soysauce520 | Original post link

There will be such logs:

  • Refresh components configs
    • Generate config pd → xxxxxxxxx … Done
| username: TiDBer_i9JTZs9v | Original post link

This is to update the pd configuration of tiup, not to write to etcd.

| username: Soysauce520 | Original post link

What I understand is that PD is essentially etcd.

| username: Hacker_n5hQKQHz | Original post link

When starting a TiKV node, you need to configure the PD address, brother.

| username: TiDBer_jYQINSnf | Original post link

When starting TiKV, the address of PD is passed in, TiKV obtains an ID from PD, then sends a heartbeat, and the new store appears :smile:

| username: 饭光小团 | Original post link

When deploying a new KV, tiup will fill in the PD address when the KV starts, and the KV will report the information to PD.

| username: TIDB-Learner | Original post link

The new node will report.

| username: TiDBer_rvITcue9 | Original post link

When deploying a new KV, tiup will fill in the PD address when the KV starts, and the KV will report the information to PD.

| username: zhang_2023 | Original post link

Keywords: config pd

| username: Hacker_QGgM2nks | Original post link

The new node will report to PD.