Abnormal TiKV Table Query

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

Original topic: tikv查询表异常

| username: TIDB救我狗命

[TiDB Usage Environment] Production Environment
[TiDB Version] 6.5.3
[Reproduction Path] Query Table
[Encountered Problem: Phenomenon and Impact]

Request range exceeds bound, request range: [7480000000000900FFF95F728000000006FF59720C0000000000FA, 7480000000000900FFF95F728000000006FF78CF9E0000000000FA), physical bound: [74800000000008FBFFF55F72800000002AFF9656D30000000000FA, 7480000000000900FF545F698000000000FF00000103E20B3B65FFECC240010419ADB8FF3000000000038000FF000000030F3B0000FD)

Stable reproduction, only this table cannot be queried. A commit was submitted on GitHub on April 18th, but the problem still exists.

| username: 大飞哥online | Original post link

Do you have a backup? If so, rebuild it and restore the business.

| username: 大飞哥online | Original post link

How about switching the leader and see if the follower is OK?

| username: TIDB救我狗命 | Original post link

The main concern is that the problem might still exist after the rebuild. If it really doesn’t work, we’ll have to switch to using JDBC to read TiDB data. However, switching to JDBC would require changing a lot of code, which is a headache.

| username: TIDB救我狗命 | Original post link

I checked the code for version 6.5.x, and it does have the above commit, but the issue still exists. I’ll try rebuilding the table first to see if it helps.

| username: 有猫万事足 | Original post link

No, at least I didn’t find this fixed test case in the files of version 6.5.5.

I didn’t find TestPartitionTableRangeRequestOrdered after TestPartitionTableIndexJoinIndexLookUp.
It really seems like it hasn’t been merged.
Could it be that it was merged without adding tests?

| username: TIDB救我狗命 | Original post link

6.5.3 above is this commit
There is also 36883

| username: 有猫万事足 | Original post link

I see, I’ve learned something new. :+1:

| username: TIDB救我狗命 | Original post link

However, I don’t know why this problem occurs. For now, I can only rebuild the table. After rebuilding, I can query it normally.

| username: 大飞哥online | Original post link

Rebuild it first, business recovery is important.

Have you tried using pd-ctl operator to schedule the leader?

It might be a 3-replica setup, and one of the replicas’ region is corrupted. Could this be the case?

| username: ajin0514 | Original post link

It is recommended to rebuild first.