The behavior of OceanBase Database Proxy (ODP) is subject to its configurations. You can modify and view ODP configurations.
ODP stores configurations in a local file named obproxy_config.bin in etc under the boot directory of obproxy processes. You can view simple configurations in this file but cannot modify the file. Otherwise, a configuration exception occurs.
Currently, ODP configurations are at the process level and affect all ODP access requests. You cannot set ODP configurations at the tenant, cluster, or user level.
Description
ODP parameters can be divided into the following types:
Dynamically modifiable parameters
These parameters take effect immediately after they are modified. For more information, see Dynamically modifiable parameters.
Parameters that are not dynamically modifiable
These parameters take effect after you restart ODP. For more information, see Parameters that are not dynamically modifiable.
In-memory parameters
Modifications to these parameters take effect only once. For more information, see In-memory parameters.
View ODP configurations
Log on to ODP by using the root@proxysys account. Specify the password that you set when you installed ODP. Run the following command to obtain specific ODP configurations:
SHOW proxyconfig [LIKE '%var_name%'];
To view all configurations, run show proxyconfig. The results are presented in a table, including the following information:
name: the variable name.
value: the variable value.
info: the variable description, which introduces the purpose of the variable.
need_reboot: indicates whether the modification takes effect after a restart. If the value is true, the modification takes effect after a restart.
visible_level: not used.
Modify configurations
You can modify ODP configurations by using one of the following methods:
Append configurations to the
-oparameter when you start ODP. Here is an example:-o <var_name>=<var_value>.Log on to ODP by using the
root@proxysysaccount and run thealter proxyconfig set <var_name>=<var_value>command to modify configurations. If the need_reboot parameter is set to true for a configuration, the modification takes effect after a restart.
The following table lists the parameters whose configuration takes effect only once.
| Parameter | Default value | Description |
|---|---|---|
| refresh_json_config | false | Specifies whether to update the JSON configuration from ConfigServer. |
| refresh_rslist | false | Specifies whether to update the RS list configuration from ConfigServer. |
| refresh_idc_list | false | Specifies whether to update the IDC configuration from ConfigServer. |
| refresh_config | false | Specifies whether to update all configurations from the MetaDB. |
| partition_location_expire_relative_time | 0 | The validity period of all location caches. |
For information about other ODP configurations, run the show proxyconfig command or read topics about ODP.
Driver support
Operations of the ODP account root@proxysys are fully compatible with the MySQL protocol, and support the COM_QUERY field of MySQL. You can also manage ODP configurations by using MySQL drivers such as Java.