Open BusyJay opened 4 years ago
You need other measures to ensure that replicas are 2:1, such as using placement-rules, or adding a rack label under the zone and ensuring that the number of racks is 2:1.
I think how to make sure it's 2:1 and when to mark it as sync is two different questions. If there is no other means to make it actually 2:1, PD should keep marking it as async or sync_recover.
I think it is ok to say state is sync. sync means 2 DCs both have full data, which is true. It is ok to be sync when there are regions cannot serve requests.
Then there should be another state that shows whether it's guaranteed to be able to fallback to asynchronous replication. The design of synchronous replication is not just about sync, but also the ability to fallback to async in given time. For users like me that have no idea how PD actually works, it's a common misunderstanding.
Please answer these questions before submitting your issue. Thanks!
zone: z1
, the others are configured withzone: z2
.After a while, there are still some regions can't serve requests. They have two replicas placed in 2 z2 nodes.