You can execute the ALTER SYSTEM MINOR FREEZE statement to manually initiate a minor compaction at the cluster, tenant, server, zone, table, or replica level.
Procedure
Log on to the
systenant as therootuser.Select an appropriate level for the minor compaction as needed.
Minor compaction at the cluster level
You can perform a minor compaction directly for an entire cluster.
obclient> ALTER SYSTEM MINOR FREEZE;Minor compaction at the zone level
You can perform a minor compaction for one or more specified zones.
The SQL syntax is as follows:
obclient> ALTER SYSTEM MINOR FREEZE ZONE [=] zone_name [, zone_name ...];For example:
obclient> ALTER SYSTEM MINOR FREEZE ZONE = zone1;Minor compaction at the tenant level
You can perform a minor compaction for one or more tenants.
The SQL syntax is as follows:
obclient> ALTER SYSTEM MINOR FREEZE TENANT [=] (' tenant_name [, tenant_name ...]');For example:
obclient> ALTER SYSTEM MINOR FREEZE TENANT = ('tenant_name');Minor compaction at the server level
You can perform a minor compaction for one or more OBServer nodes.
The SQL syntax is as follows:
obclient> ALTER SYSTEM MINOR FREEZE SERVER = ('ip:port' [, 'ip:port'...]);For example:
obclient> ALTER SYSTEM MINOR FREEZE SERVER = ('10.10.10.1:2882');Minor compaction at the replica level
You can perform a minor compaction for a specified partition replica.
The SQL syntax is as follows:
obclient> ALTER SYSTEM MINOR FREEZE PARTITION_ID [=] 'partition_id%partition_count@table_id'For example:
obclient> ALTER SYSTEM MINOR FREEZE PARTITION_ID = '8%0@110061113945388';
After you initiate a minor compaction, you can view the information about it. For more information, see View minor compaction information.