ob_route_policy specifies the routing strategy for selecting a replica within an OBServer node.
| Attribute |
Description |
| Type |
ENUM |
| Default value |
1 |
| Value range |
- 1 (
READONLY_ZONE_FIRST): Requests are preferentially routed to the zone where a read-only replica resides.
- 2 (
ONLY_READONLY_ZONE): Requests are routed only to the zone where a read-only replica resides.
- 3 (
UNMERGE_ZONE_FIRST): Requests are preferentially routed to the zone where a replica not undergoing a major compaction resides.
- 4 (
UNMERGE_FOLLOWER_FIRST): Requests are preferentially routed to a follower not undergoing a major compaction.
- 5 (
COLUMN_STORE_ONLY): Requests are routed only to a columnstore replica.
|
| Effective scope |
GlobalSession |
| Modifiable |
Yes. You can use the SET statement to modify the variable. |
Examples
Session-level operation
obclient> SET ob_route_policy = 'READONLY_ZONE_FIRST';
or
obclient> SET ob_route_policy = 1;
Global-level operation
obclient> SET GLOBAL ob_route_policy = 'READONLY_ZONE_FIRST';
or
obclient> SET GLOBAL ob_route_policy = 1;
References
SQL routing