You can immediately trigger a major compaction for a cluster in the idle state. When an error occurs during the major compaction of the cluster, you can perform troubleshooting to clear the error, and then continue with the major compaction.
Prerequisites
Make sure that you have the following permissions:
-
Resource Permissions : Cluster Maintenance permission -
Menu Permissions : Permission on theCompaction Management menu ofClusters
-
Cluster-level major compactions are no longer supported in OceanBase Database V4.0 and later. You can initiate a major compaction only for a primary tenant in a cluster. The major compaction for a standby tenant is automatically triggered after the standby tenant synchronizes the major compaction status of the primary tenant. You cannot manually initiate a major compaction for a standby tenant.
The
enable_manual_mergeparameter specifies whether to enable manual major compactions. If the cluster version is between OceanBase Database V1.x and V3.x, make sure that theenable_manual_mergeparameter is set toFalseon the page that appears after you choose Clusters > Parameter Management. Alternatively, ifenable_manual_mergeis set toTrue, manually perform a major compaction by using SQL statements. For more information, see Manually control a major compaction.
Procedure
Log on to the OceanBase Cloud Platform (OCP) console.
In the left-side navigation pane, click
Clusters to go to theClusters page.In the
Clusters list on theClusters page, find the target cluster and click its name.In the left-side navigation pane of the page that appears, click
Compaction Management .On the
Details of Major Compaction tab, view the major compaction information in theBasic Information section.
After you confirm that the cluster is in the
Idle state, clickInitiate Major Compaction . The system will initiate a major compaction for all tenants in the cluster.After a major compaction is initiated, the major compaction progress is displayed next to
Status .If the status is Tenant major compaction in progress, you can click
View Tenants to view the tenants that are in the progress of the major compaction.When an error occurs during the major compaction of the tenants, you can click
View Tenants to locate the faulty tenant. After you perform troubleshooting, clickClear Exceptions to clear the error flag and continue the major compaction.Notice
When an error occurs during a major compaction, we recommend that you contact a professional to verify the problem. If you clear the error flag without troubleshooting the error, the error scope may expand.