Setting and Querying max-replicas

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

Original topic: max-replicas的设置与查询

| username: TiDBer_FMWXa7ja

[TiDB Usage Environment] Production Environment / Testing / PoC
[TiDB Version]
[Reproduction Path]
[Encountered Problem: Problem Phenomenon and Impact] By setting the number of region replicas to 1 using set config pd 'replication.max-replicas'=1, the official documentation states that subsequent configurations will be based on etcd. What does the etcd configuration mean, and where can I view the etcd configuration information?
[Resource Configuration]
[Attachments: Screenshots/Logs/Monitoring]

| username: WalterWj | Original post link

pd-ctl should be looking at the contents of etcd.

| username: 我是咖啡哥 | Original post link

You can view the parameters set by set config using show config, right?

| username: TiDBer_FMWXa7ja | Original post link

Why do newly created tables have two replicas after I set max-replicas to 1? As shown in the picture.

| username: Running | Original post link

Theoretically, after one replica, the default is three, isn’t it the previous one?

| username: TiDBer_FMWXa7ja | Original post link

Previously, when creating a table, each region had three peers. After changing max-replicas to 1, the regions of newly created tables all have two peers.

| username: 裤衩儿飞上天 | Original post link

Let’s see what roles these two peers have.

| username: 考试没答案 | Original post link

“Peers” means replicas. 3 replicas mean: 3 peers.

| username: 考试没答案 | Original post link

region_ID: 5548 represents the leader. 5546 represents a replica. However, you are showing 2 replicas here, which is not the default 3 replicas. Also, if the initialization is with two TiKV, there will be 2 replicas.

| username: 考试没答案 | Original post link

Please share a screenshot of the display. It shouldn’t be two; it should be one. If there is TiFlash, there should also be a learner node.

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.