TiDB Query Error: Region Not Found for Key

This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: tidb查询数据报错 region not found for key

| username: TI表弟

【TiDB Usage Environment】Poc
【TiDB Version】
【Reproduction Path】What operations were performed to encounter the issue
【Encountered Issue: Issue Phenomenon and Impact】
【Resource Configuration】
【Attachments: Screenshots/Logs/Monitoring】

[2023/02/28 23:27:09.335 +08:00] [WARN] [backoff.go:158] [“pdRPC backoffer.maxSleep 10000ms is exceeded, errors:\nregion not found for key "74800000000000010F5F69800000000000000801616D617A6F6E2E63FF6F6D000000000000F901423037324B314C4EFF4E59000000000000F90419AF3B76B9000001" at 2023-02-28T23:27:01.850892429+08:00\nregion not found for key "74800000000000010F5F69800000000000000801616D617A6F6E2E63FF6F6D000000000000F901423037324B314C4EFF4E59000000000000F90419AF3B76B9000001" at 2023-02-28T23:27:04.062178169+08:00\nregion not found for key "74800000000000010F5F69800000000000000801616D617A6F6E2E63FF6F6D000000000000F901423037324B314C4EFF4E59000000000000F90419AF3B76B9000001" at 2023-02-28T23:27:06.44840141+08:00\nlongest sleep type: pdRPC, time: 11832ms”]

| username: tidb狂热爱好者 | Original post link

The region is lost. Find solutions for handling lost regions.

| username: TI表弟 | Original post link

How do I delete region_id 168937 that I found using pd-ctl region key?

| username: wzf0072 | Original post link

| username: h5n1 | Original post link

Try clearing the PD’s region cache, it may be risky.

curl -X DELETE http://${HostIP}:2379/pd/api/v1/admin/cache/region/{region_id}
| username: tidb菜鸟一只 | Original post link

Did your TiKV nodes go down? How many went down?

| username: TI表弟 | Original post link

Hung one up

| username: TI表弟 | Original post link

The expert’s post solved the issue, and the index was finally rebuilt.

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.