Skip to content

Commit 66c3dc6

Browse files
Merge pull request #1624 from redis/DOC-1554
Add syncer error recovery troubleshooting documentation
2 parents d39fdc4 + f622a01 commit 66c3dc6

File tree

1 file changed

+45
-4
lines changed
  • content/operate/rs/databases/active-active

1 file changed

+45
-4
lines changed

content/operate/rs/databases/active-active/syncer.md

Lines changed: 45 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,19 @@ When a new primary is appointed, the replication ID changes, but a partial sync
2828

2929

3030
In a partial sync, the backlog of operations since the offset are transferred as raw operations.
31-
In a full sync, the data from the primary is transferred to the replica as an RDB file which is followed by a partial sync.
31+
In a full sync, the data from the primary is transferred to the replica as an RDB file which is followed by a partial sync.
3232

3333
Partial synchronization requires a backlog large enough to store the data operations until connection is restored. See [replication backlog]({{< relref "/operate/rs/databases/active-active/manage#replication-backlog" >}}) for more info on changing the replication backlog size.
3434

3535
### Syncer in Active-Active replication
3636

3737
In the case of an Active-Active database:
3838

39-
- Multiple past replication IDs and offsets are stored to allow for multiple syncs
40-
- The [Active-Active replication backlog]({{< relref "/operate/rs/databases/active-active/manage#replication-backlog" >}}) is also sent to the replica during a full sync.
39+
- Multiple past replication IDs and offsets are stored to allow for multiple syncs
40+
- The [Active-Active replication backlog]({{< relref "/operate/rs/databases/active-active/manage#replication-backlog" >}}) is also sent to the replica during a full sync.
4141

4242
{{< warning >}}
43-
Full sync triggers heavy data transfers between geo-replicated instances of an Active-Active database.
43+
Full sync triggers heavy data transfers between geo-replicated instances of an Active-Active database.
4444
{{< /warning >}}
4545

4646
An Active-Active database uses partial synchronization in the following situations:
@@ -53,4 +53,45 @@ An Active-Active database uses partial synchronization in the following situatio
5353

5454
{{< note >}}
5555
Synchronization of data from the primary shard to the replica shard is always a full synchronization.
56+
{{< /note >}}
57+
58+
## Troubleshooting syncer errors
59+
60+
### Unrecoverable syncer errors
61+
62+
Some syncer errors are unrecoverable and cause the syncer to exit with exit code 4. When this occurs, the Data Management Controller (DMC) automatically sets the `crdt_sync` or `replica_sync` value to `stopped`.
63+
64+
#### Restart syncer for regular databases
65+
66+
To restart a regular database's syncer after an unrecoverable error, [update the database configuration]({{<relref "/operate/rs/references/rest-api/requests/bdbs#put-bdbs">}}) with the REST API to enable `sync`:
67+
68+
69+
```sh
70+
curl -v -k -u <username>:<password> -X PUT \
71+
-H "Content-Type: application/json" \
72+
-d '{"sync": "enabled"}' \
73+
https://<host>:<port>/v1/bdbs/<database-id>
74+
```
75+
76+
#### Restart syncer for Active-Active databases
77+
78+
To restart an Active-Active database's syncer after an unrecoverable error, use one of the following methods.
79+
80+
- For each participating cluster, [update the database configuration]({{<relref "/operate/rs/references/rest-api/requests/bdbs#put-bdbs">}}) with the REST API to enable `sync`:
81+
82+
```sh
83+
curl -v -k -u <username>:<password> -X PUT \
84+
-H "Content-Type: application/json" \
85+
-d '{"sync": "enabled"}' \
86+
https://<host>:<port>/v1/bdbs/<database-id>
87+
```
88+
89+
- Run [`crdb-cli crdb update`]({{<relref "/operate/rs/references/cli-utilities/crdb-cli/crdb/update">}}):
90+
91+
```sh
92+
crdb-cli crdb update --crdb-guid <crdb-guid> --force
93+
```
94+
95+
{{< note >}}
96+
Replace `<username>`, `<password>`, `<host>`, `<port>`, `<database-id>`, and `<crdb-guid>` with your actual values.
5697
{{< /note >}}

0 commit comments

Comments
 (0)