After DR Auto-Sync is created, it becomes asynchronous

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

Original topic: DR Auto-Sync创建好后变成异步状态

| username: chenhanneu

[TiDB Usage Environment] Production Environment / Testing / Poc
[TiDB Version] v7.1.1
[Reproduction Path] What operations were performed to cause the issue
17 18 19 are east, 20 21 22 are west
[Encountered Issue: Problem Phenomenon and Impact]
curl http://10.xxxxx:2379/pd/api/v1/replication_mode/status
{
“mode”: “dr-auto-sync”,
“dr-auto-sync”: {
“label_key”: “az”,
“state”: “async”,
“state_id”: 349,
“acid_consistent”: true
}
}
The state briefly changes to sync, but then it remains async
[Resource Configuration]
[Attachments: Screenshots/Logs/Monitoring]
1690788120302
rule.json
[
{
“group_id”: “pd”,
“group_index”: 0,
“group_override”: false,
“rules”: [
{
“group_id”: “pd”,
“id”: “az-east”,
“start_key”: “”,
“end_key”: “”,
“role”: “voter”,
“count”: 3,
“label_constraints”: [
{
“key”: “az”,
“op”: “in”,
“values”: [
“east”
]
}
],
“location_labels”: [
“az”,
“rack”,
“host”
]
},
{
“group_id”: “pd”,
“id”: “az-west”,
“start_key”: “”,
“end_key”: “”,
“role”: “follower”,
“count”: 2,
“label_constraints”: [
{
“key”: “az”,
“op”: “in”,
“values”: [
“west”
]
}
],
“location_labels”: [
“az”,
“rack”,
“host”
]
},
{
“group_id”: “pd”,
“id”: “az-west”,
“start_key”: “”,
“end_key”: “”,
“role”: “learner”,
“count”: 1,
“label_constraints”: [
{
“key”: “az”,
“op”: “in”,
“values”: [
“west”
]
}
],
“location_labels”: [
“az”,
“rack”,
“host”
]
}
]
}
]

It should normally be sync, is there something configured incorrectly?

| username: zhanggame1 | Original post link

You have configured “mode”: “dr-auto-sync” here, not sync. The switch might have too much delay.

| username: redgame | Original post link

Frequent data updates?

| username: chenhanneu | Original post link

Rarely updated

| username: caiyfc | Original post link

You have been misled by the official documentation. Check out my post: Column - Same City Dual Center DR Auto-Sync Main Center Unexpected Failure Recovery | TiDB Community

The id in rule.json must not be duplicated.

| username: cassblanca | Original post link

You have set “mode”: “dr-auto-sync”, and the cluster’s replication mode can automatically switch between three states:

  • When everything in the cluster is normal, it will enter synchronous replication mode to maximize data integrity in the disaster recovery AZ.
  • When the AZ network is disconnected or the disaster recovery AZ experiences a complete failure, after a pre-set protection window, the cluster will enter asynchronous replication mode to ensure business availability.
  • When the AZ network reconnects or the disaster recovery AZ fully recovers, the TiKV nodes in the disaster recovery AZ will rejoin the cluster, gradually synchronize data, and eventually switch back to synchronous replication mode.
    Single Region Dual AZ Deployment TiDB | PingCAP Documentation Center
| username: chenhanneu | Original post link

Directly adjust the id or async, delete and reconfigure rule.json with different ids, and apply it to change to sync status. The official documentation does have some issues with this setting.

| username: system | Original post link

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