Overview
The choose_migration_source_policy clause is used to specify the priority policy for selecting source replicas during migration.
Privilege requirements
Query parameters
Both the
systenant and all user tenants can query this parameter using theSHOW PARAMETERSstatement or theGV$OB_PARAMETERSview.Modify parameters
Both the
systenant and user tenants can use theALTER SYSTEM SETstatement to modify this parameter.
Attributes
Attribute |
Description |
|---|---|
| Parameter type | String |
| Default Value | idc |
| Value range |
|
| Modifiable | Yes, you can use theALTER SYSTEM SETStatement modification. |
| Whether to restart the OBServer node for the change to take effect | No, the setting takes effect immediately. |
Usage instructions
Based on region information, the network relationships between the server hosting the source replica and the server hosting the destination replica can be classified into three regions: same IDC, same region; different IDCs within the same region; and cross-region.
When the value of
choose_migration_source_policyis IDC.Prioritizes selecting a server with a follower replica within the same IDC as the source. If multiple eligible follower replicas exist, one is randomly chosen. If no eligible follower replicas are found, an eligible leader replica is selected. If no replicas meet the criteria, the region mode is used as a fallback.
When the value of
choose_migration_source_policyis Region.Different IDC zones within the same region.
First, a follower replica on a server within the same region is selected as the source. If multiple eligible follower replicas exist, one is randomly chosen. If no eligible follower replicas are found, an eligible leader replica is selected. If no replicas meet the criteria, the selection process proceeds to cross-region replication.
Cross-region.
Preferentially selects a server hosting a follower replica across regions as the source. If multiple eligible follower replicas exist, one is randomly chosen. If no eligible replica is found, error 4600 is returned.
Within the same region, if the bandwidth across IDCs is significantly worse than the bandwidth within an IDC, it is recommended to set this parameter value to IDC. If the difference between the two bandwidths is not significant, it is recommended to set this value to Region.
The region information of the OBServer node must be set correctly. Otherwise, the migration source feature will not work properly.
Configuration example
Configure the migration source replica to prefer selecting from replicas within the same IDC.
obclient> ALTER SYSTEM SET choose_migration_source_policy='idc';