Applicable scenarios
This article is suitable for root cause analysis of Schema leak problems. It is based on the analysis of OceanBase database internal table data and logs to help locate the cause of Schema leaks.
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 table data, only current data is supported for analysis.
Can import environment variables
Variable name |
Is it required |
Data type |
Default value |
Description |
|---|---|---|---|---|
| tenant_id | No | string | "" | Specifies the tenant ID to be analyzed. |
Usage example
- Configure analysis scenarios, executed by default
obdiag rca run --scene=schema_leak
```* Configure the analysis scenario and specify the tenant ID
```shell
obdiag rca run --scene=schema_leak --env tenant_id=1001
Analyze content
This scenario analyzes the following:
- Schema version history: Check the history of Schema versions and analyze whether there is abnormal growth.
- Schema refresh status: Analyze the status and frequency of Schema refresh.
- Memory usage analysis: Check Schema-related memory usage.
- Historical DDL operations: Analyze whether historical DDL operations cause Schema leaks.
Output results
After the analysis is completed, a diagnostic report will be generated, which includes:
- Root cause analysis results of Schema leaks
- Leak point location information
- Fix suggestions
Common reasons
Common causes of Schema leaks include:
- Frequent DDL operations lead to too many Schema versions.
- Schema refresh mechanism is abnormal.
- Long-running transactions prevent Schema recycling.
- Schema cannot be cleaned properly due to some bugs.
Solution suggestions
- Avoid too frequent DDL operations.
- Check for long-running transactions or sessions.
- If it is confirmed to be a bug, please upgrade to the fixed version or contact technical support.
