PD Metadata

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

Original topic: PD元数据

| username: TiDBer_fiJaQjDR

Could you please help reply with what metadata is stored by PD?

| username: TiDBer_21wZg5fm | Original post link

The metadata of the entire cluster.

| username: TiDBer_小阿飞 | Original post link

  • PD divides the entire data into a series of Regions based on the size of the data, with each Region carrying a smaller range of the entire data. PD maintains the following metadata for each Region:

{

“id”: 10001,

“start_key”: “xxx”,

“end_key”: “yyy”,

“epoch”: {

“conf_ver”: 50,

“version”: 268

},

“peers”: [

{

 "id": 7820688,

“store_id”: 7583502






},



{





“id”: 9147810,

“store_id”: 7586672






},



{





“id”: 9186477,

“store_id”: 7584594






}



],



“leader”: {



“id”: 7820688,



“store_id”: 7583502



},



“written_bytes”: 15639,



“read_bytes”: 236,



“approximate_size”: 515,



“approximate_keys”: 4747086



}
| username: TiDBer_小阿飞 | Original post link

Refer to https://tidb.net/blog/a19e33e6

| username: zhaokede | Original post link

Partition information of the table, number of replicas, replica locations, etc.

| username: TiDBer_fiJaQjDR | Original post link

PD stores TiKV’s routing information and region information, while the table schema and other metadata are stored by TiKV itself.

| username: TiDBer_fiJaQjDR | Original post link

The metadata information about the Schema should be stored by TiKV itself.

| username: Kamner | Original post link

You can connect to the PD command line yourself and take a look

tiup ctl:{$CLUSTER_VERSION} pd -u 10.0.XXX.XXX:2379 -i
| username: TiDBer_fiJaQjDR | Original post link

I can’t view images directly. Please provide the text you need translated.

| username: DBAER | Original post link

Mark it.

| username: yulei7633 | Original post link

Of course, it is stored in the TiKV nodes.

| username: TiDBer_Lee | Original post link

The metadata of the entire TiKV cluster
Allocation of global IDs and transaction IDs
Global TSO
Collection of cluster information
Dashboard

| username: stephanie | Original post link

In PD, it should store TiKV node information, Region information, and raft group information.

| username: TiDBer_aKu9dgpb | Original post link

You can view the stored metadata details through the API.

| username: TiDBer_QYr0vohO | Original post link

Global ID and transaction ID, global TSO, cluster information

| username: dba远航 | Original post link

The metadata of the entire TiKV cluster, allocation of global IDs and transaction IDs, global TSO, collection of cluster information, dashboard.

| username: shigp_TIDBDBER | Original post link

Region information, table, index information

| username: shigp_TIDBDBER | Original post link

Here to learn, thank you for sharing.

| username: TiDBer_JUi6UvZm | Original post link

The brain is the answer, all metadata.

| username: TiDBer_JUi6UvZm | Original post link

You see, many tools require providing the PD address, which indicates that they either fetch metadata from PD or update PD metadata.