ADMIN-SET-REPLICA-VERSION
Name
ADMIN SET REPLICA VERSION
Description
This statement is used to set the version, maximum success version, and maximum failure version of the specified replica.
This command is currently only used to manually repair the replica version when the program is abnormal, so that the replica can recover from the abnormal state.
grammar:
ADMIN SET REPLICA VERSION
PROPERTIES ("key" = "value", ...);
The following properties are currently supported:
tablet_id
: Required. Specify a Tablet Id.backend_id
: Required. Specify Backend Id.version
: Optional. Set the replica version.last_success_version
: Optional. Set the replica max success version.last_failed_version
: Optional. Set the replica max failed version.
If the specified replica does not exist, it will be ignored.
Note:
Modifying these values may cause subsequent data reading and writing failures, resulting in data inconsistency. Please operate with caution!
Record the original value before modifying it. After the modification is completed, verify the read and write of the table. If the read and write fail, please restore the original value! But recovery may fail!
It is strictly prohibited to operate the tablet that is writing data!
Example
Clear the replica failed version of tablet 10003 on BE 10001.
```sql
ADMIN SET REPLICA VERSION PROPERTIES(“tablet_id” = “10003”, “backend_id” = “10001”, “last_failed_version” = “-1”);
```
Set the replica status of tablet 10003 on BE 10001 to ok.
ADMIN SET REPLICA VERSION PROPERTIES("tablet_id" = "10003", "backend_id" = "10001", "version" = "1004");
Keywords
ADMIN, SET, REPLICA, VERSION