ADMIN SET PARTITION VERSION
ADMIN SET PARTITION VERSION sets a partition to a specific data version.
Note that manually setting the partition version is a high-risk operation and is recommended only when problems occur in the cluster metadata. In normal circumstances, the version of a partition is consistent with that of the tablets within.
tip
This operation requires the SYSTEM-level OPERATE privilege. You can follow the instructions in GRANT to grant this privilege.
Syntaxβ
ADMIN SET TABLE <table_name> PARTITION ( <partition_name> | <partition_id> )
VERSION TO <version>
Parametersβ
table_name: The name of the table to which the partition belongs.partition_name: The name of the partition. You need to specify a partition using eitherpartition_nameorpartition_id. For non-partitioned tables,partition_nameis the same as the table name.partition_id: The ID of the partition. You need to specify a partition using eitherpartition_nameorpartition_id. For tables with the random bucketing strategy, you can only usepartition_idto specify the partition.version: The version you want to set for the partition.
Examplesβ
-
Set the version of the non-partitioned table
t1to10.ADMIN SET TABLE t1 PARTITION(t1) VERSION TO 10; -
Set the version of partition
p1in tablet2to10.ADMIN SET TABLE t2 PARTITION(p1) VERSION TO 10; -
Set the version of the partition whose ID is
123456to10.t3is a table with the random bucketing strategy.ADMIN SET TABLE t3 PARTITION('123456') VERSION TO 10;