Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: max-replicas的设置与查询
[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]
pd-ctl should be looking at the contents of etcd.
You can view the parameters set by set config
using show config
, right?
Why do newly created tables have two replicas after I set max-replicas to 1? As shown in the picture.
Theoretically, after one replica, the default is three, isn’t it the previous one?
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.
Let’s see what roles these two peers have.
“Peers” means replicas. 3 replicas mean: 3 peers.
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.
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.
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.