When you add or remove a data node, the data node automatically triggers a data balancing task. The task occupies the CPU and I/O resources of the data node, which may degrade the business performance. Therefore, PolarDB-X provides a maintenance window to help you avoid executing the data balancing task during peak hours.
Prerequisites
The instance version must be 5.4.18-17152226 or later.
Only Enterprise Edition instances support this feature.
For more information about the instance version number, see Release notes.
For more informatino about how to view the instance version, see View and update the version of an instance.
Procedure
Log on to the PolarDB-X console.
In the top navigation bar, select the region where the instance is deployed.
On the Instances page, click the PolarDB-X 2.0 tab.
Find the instance from which you want to detach the data disk and click the instance ID.
In the left-side navigation pane, choose . On the page that appears, set Compute Layer parameters
REBALANCE_MAINTENANCE_TIME_STARTandREBALANCE_MAINTENANCE_TIME_END.The following table describes the parameters.
Parameter
Description
REBALANCE_MAINTENANCE_TIME_START
The start time of data balancing, in the 24-hour clock. Default value:
00:00. If the data balancing task is not completed, it will automatically continue at this point in time.REBALANCE_MAINTENANCE_TIME_END
The end time of data balancing, in the 24-hour clock. Default value:
00:00. If the data balancing task is not completed, the task is automatically suspended until the next maintenance window.ImportantThe new parameter values take effect in real time.
The data balancing task is automatically divided into multiple subtasks based on the data volume. The time window must be greater than the execution time of any subtask. Otherwise, the subtask will be repeatedly executed in each subsequent maintenance window. As a result, other subtasks cannot start and the overall data balancing task cannot be completed. Therefore, we recommend that you set the maintenance window to be greater than 5 hours. If you have questions about the maintenance window, contact us.
If a data balancing task is running after the parameter is set and the task is not within the new maintenance window, the data balancing task immediately stops and does not start until the maintenance window.
If the
REBALANCE_MAINTENANCE_TIME_STARTvalue is earlier than theREBALANCE_MAINTENANCE_TIME_ENDvalue, the maintenance window is fromREBALANCE_MAINTENANCE_TIME_STARTtoREBALANCE_MAINTENANCE_TIME_ENDof the current day.If the
REBALANCE_MAINTENANCE_TIME_STARTvalue is later than theREBALANCE_MAINTENANCE_TIME_ENDvalue, the maintenance window is fromREBALANCE_MAINTENANCE_TIME_STARTof the current day toREBALANCE_MAINTENANCE_TIME_ENDof the next day.If the
REBALANCE_MAINTENANCE_TIME_STARTvalue is equal to theREBALANCE_MAINTENANCE_TIME_ENDvalue, no maintenance window is set. After you add or remove a data node, the data balancing task automatically starts (regardless of whether it is within peak hours or not) and lasts until the data balancing task is completed.