Applicable scenarios
This article is suitable for root cause analysis of weak read problems. It is analyzed based on the internal table data and logs of OceanBase database to help locate weak read related problems.
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=weak_read_troubleshooting
```* Configure the analysis scenario and specify the tenant ID
```shell
obdiag rca run --scene=weak_read_troubleshooting --env tenant_id=1001
Analyze content
This scenario analyzes the following:
- Weak read timestamp: Check the progress of weak read timestamp.
- Log synchronization status: Analyze the log synchronization status of each replica.
- Weak read configuration: Check the configuration parameters related to weak read.
- Network delay: Analyze the impact of network delay on weak reads.
Output results
After the analysis is completed, a diagnostic report will be generated, which includes:
- Root cause analysis results of weak read problem
- Problem location information
- Fix suggestions
FAQ
Common problems related to weak reads include:
- Weak read timestamp advancement is slow: It may be caused by log synchronization delay.
- Weak read data inconsistency: may be caused by improper configuration or network problems.
- Weak read timeout: May be caused by high system load or network delay.
Related configuration
Main configuration parameters related to weak reads:
Parameter name |
Description |
|---|---|
| max_stale_time_for_weak_consistency | Maximum stale time for weakly consistent reads, default 5 seconds. |
| weak_read_version_refresh_interval | Weak read version refresh interval. |
Solution suggestions
- Check whether the network delay and bandwidth are normal.
- Confirm whether the log synchronization status is normal.
- Adjust weak read related configuration parameters according to business needs.
- If you find that the system load is too high, consider expanding the capacity or optimizing the load.
