Purpose
enable_reroute specifies whether to enable rerouting. If rerouting is enabled, when routing fails for the first time, the request is forwarded to the corresponding OBServer node again.
Attributes
Attribute |
Description |
|---|---|
| Parameter type | Boolean |
| Default value | False |
| Value range |
|
| Effective only after ODP restart | No |
Configuration examples
Example 1: Configure secondary routing for normal cases
Enable the secondary routing feature.
obclient> ALTER PROXYCONFIG SET enable_reroute = True;Enable the protocol between ODP and OceanBase Database. Take OceanBase Protocol 2.0 as an example.
obclient> ALTER PROXYCONFIG SET server_protocol = 'OceanBase 2.0';
Example 2: Configure secondary routing for global indexes
Enable the secondary routing feature.
obclient> ALTER PROXYCONFIG SET enable_reroute = True;Enable the protocol between ODP and OceanBase Database. Take OceanBase Protocol 2.0 as an example.
obclient> ALTER PROXYCONFIG SET server_protocol = 'OceanBase 2.0';Enable global index table routing based on global index keys.
obclient> ALTER PROXYCONFIG SET enable_index_route = True;
References
- Set the protocol type between ODP and OceanBase Database: server_protocol
- Set whether ODP enables global index table routing based on global index keys: enable_index_route