When you add or remove a data node, PolarDB-X automatically starts a data rebalancing task. The task consumes CPU and I/O resources on the data node, which can degrade performance during peak hours. Use the maintenance window to restrict the task to low-traffic periods.
Prerequisites
Before you begin, ensure that you have:
A PolarDB-X Enterprise Edition instance running version 5.4.18-17152226 or later. For a list of versions, see Release notes. To check the version of your instance, see View and update the version of an instance
How it works
PolarDB-X splits a data rebalancing task into multiple subtasks based on data volume. Each subtask must complete within a single maintenance window. If the window is shorter than the time a subtask needs, that subtask retries in every subsequent window and blocks all remaining subtasks — the overall rebalancing never finishes.
Set the maintenance window to at least 5 hours to avoid this situation. If you have questions about the appropriate window length for your workload, contact us.
Set the maintenance window
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 and click the instance ID.
In the left-side navigation pane, choose Configuration Management > Parameter Settings.
Under Compute Layer, set the following parameters:
Parameter Description Default REBALANCE_MAINTENANCE_TIME_STARTStart time of the maintenance window, in 24-hour clock format. If the rebalancing task is not complete when the window opens again, the task automatically resumes. 00:00REBALANCE_MAINTENANCE_TIME_ENDEnd time of the maintenance window, in 24-hour clock format. If the rebalancing task is not complete when the window closes, the task pauses until the next window. 00:00
New parameter values take effect immediately. If a rebalancing task is running when you update the parameters, and the task falls outside the new window, it stops immediately and does not resume until the next maintenance window.
FAQ
What happens when the start time equals the end time?
When REBALANCE_MAINTENANCE_TIME_START equals REBALANCE_MAINTENANCE_TIME_END, no maintenance window is set. After you add or remove a data node, the rebalancing task starts immediately and runs continuously until it completes, regardless of peak hours. To prevent this, set the two parameters to different values.
Does the window span midnight?
It depends on whether the start time is earlier or later than the end time:
Start time is earlier than end time: The window runs from the start time to the end time on the same day. For example,
02:00to07:00means the window is from 02:00 to 07:00 each day.Start time is later than end time: The window spans midnight, from the start time on the current day to the end time on the next day. For example,
22:00to04:00means the window runs from 22:00 to 04:00 the following morning.