server: carry more diagnostic information in the region unavailable error message or logs
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Enhancement
The ` ERROR 9005 (HY000): Region is unavailable` would be returned to the client in cases the region in tikv is unavailable to serve for some reasons. This error message and the corresponding error log do not contain detailed error information. Troubleshooting these types of issues typically requires searching for all tidb logs related to the query that triggered the error, in order to analyze the issue.
It would be better to include detailed error information, such as region details, retry attempts, and the handling of region errors, in the error messages and dispatch failure error tidb logs. This would improve the efficiency of troubleshooting similar issues.
Contributor guide
Assessment
This issue has not been assessed yet.