Note
- For V4.3.x, this parameter is available starting with V4.3.2.
- For V4.2.x, this parameter is available starting with V4.2.1 BP7 and V4.2.3.
Description
choose_migration_source_policy specifies the priority strategy for selecting the source replica during migration.
Privilege requirements
Query the parameter
The
systenant and all user tenants can query this parameter by using theSHOW PARAMETERSstatement or theGV$OB_PARAMETERSview.Modify the parameter
The
systenant and user tenants can modify this parameter by using theALTER SYSTEM SETstatement.
Attributes
| Attribute | Description |
|---|---|
| Type | String |
| Default value | idc |
| Value range |
|
| Modifiable | Yes. You can use the ALTER SYSTEM SET statement to modify the parameter. |
| Effective upon OBServer node restart | No. The setting takes effect immediately. |
Considerations
Based on the region information, the network relationship between the server where the source replica is located and the destination server can be divided into three regions: same IDC, same Region but different IDC, and cross-Region.
If the value of
choose_migration_source_policyis set toidc:It selects the Follower replica in the same IDC as the source replica. If multiple Follower replicas are available, it randomly selects one. If no Follower replica is available, it selects the Leader replica. If no replica is available, it switches to the Region mode.
If the value of
choose_migration_source_policyis set toregion:Same Region but different IDC:
It selects the Follower replica in the same Region as the source replica. If multiple Follower replicas are available, it randomly selects one. If no Follower replica is available, it selects the Leader replica. If no replica is available, it switches to the cross-Region mode.
Cross-Region:
It selects the Follower replica in the cross-Region as the source replica. If multiple Follower replicas are available, it randomly selects one. If no replica is available, it returns error 4600.
If the bandwidth between servers in the same Region but different IDCs is significantly lower than that in the same IDC, we recommend that you set the value of this parameter to
idc. If the bandwidths are similar, we recommend that you set the value toregion.You must correctly set the region information of the OBServer nodes. Otherwise, the migration source feature will not work properly.
Examples
Configure the migration source replica to be selected from the same IDC replica.
obclient> ALTER SYSTEM SET choose_migration_source_policy='idc';
