connection_diagnosis_option specifies an option that allows you to enable diagnostics for the current connection by using a bit.
Bit 0 specifies whether to record connection diagnostics logs.
Bit 1 specifies whether to build an error packet when internal errors occur.
Bit 2 specifies whether to print logs for normal login or logout.
Note
This parameter is introduced since OceanBase Database Proxy (ODP) V4.2.2. Since ODP V4.2.3, the default value is changed from
1to3.Since ODP V4.3.6, a third bit is added to specify whether to print logs for normal login or logout. The default value is changed from
3to7.
Attribute |
Description |
|---|---|
| Parameter type | Integer |
| Default value | 7 |
| Value range | [0, 7] |
| Effective only after ODP restart | No |
When the value of the connection_diagnosis_option parameter is 7, the performance of ODP V4.3.6 degrades by up to 6% in short connection scenarios compared with that of ODP V4.3.5. Therefore, the recommended value of the connection_diagnosis_option parameter varies depending on the scenario, as described below:
In long connection scenarios, the logout logs have negligible performance impact. We recommend that you set the value of the
connection_diagnosis_optionparameter to7.If performance in short connection scenarios is sensitive, we recommend that you set the value of the
connection_diagnosis_optionparameter to3and the value of theprotocol_diagnosis_levelparameter to0.
Notice
When the parameter is set to the extreme performance mode, it may be difficult to locate the cause of an exception (such as a disconnection or hung state) due to the lack of critical diagnostic logs. We recommend that you consider this carefully.
