Applicable scenarios
This article is suitable for root cause analysis of hanging transactions, based on OceanBase database internal table data and logs.
Currently, OceanBase database V4.0.0.0 and later versions are supported. When using obdiag, you need to configure the cluster information in the ~/.obdiag/config.yml file according to your choice, or configure the cluster information through the --config option in the command.
Attention
Due to the timeliness of internal data, only current data is supported for analysis.
Can import environment variables
Variable name |
Is it required |
Data type |
Default value |
Description |
|---|---|---|---|---|
| since | No | string | "30m" | Specify the time period of the logs to be analyzed. The default is 30m, which means analyzing the logs within the past 30 minutes. |
| tenant_name | No | string | "" | Specifies the tenant name to be analyzed. |
| tx_id | No | string | "" | Specifies the transaction ID to be analyzed, used to analyze specific transactions. |
Usage example
- Configure analysis scenarios, executed by default
obdiag rca run --scene=suspend_transaction
```* Configure the analysis scenario and specify to analyze the logs of the past 40 minutes
```shell
obdiag rca run --scene=suspend_transaction --env since=40m
```* Configure the analysis scenario and specify the tenant name
```shell
obdiag rca run --scene=suspend_transaction --env tenant_name=test
```* Configure the analysis scenario and specify the transaction ID to analyze specific transactions
```shell
obdiag rca run --scene=suspend_transaction --env tx_id=12345
