Tikv-ctl cannot find the scanned key

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

Original topic: tikv-ctl扫描key找不到

| username: Hacker_zKg8MmGa

I found the starting key of my table like this:

Converted to escaped format:
There is data in my table:
But why is there nothing when I call tikv-ctl to scan the key?

| username: h5n1 | Original post link

There is an escape conversion followed by another conversion, take a look at this

Additionally, you can research this tool, I haven’t used it either.

This tool was developed by a senior engineer at PingCAP. Although it hasn’t been officially released, it is indeed quite useful. TransferDB is part of the commonly used TiDB operations toolset (TiDBA), which also includes collecting statistics, Mok parsing keys, generating scatter statements based on region keys, data ranges, and data estimates, viewing table data and index region leader distribution, version upgrades, comparing 3.0 and 4.0 configuration files and TiDB system variables, etc. It can be said to be very practical. Its project homepage is GitHub - wentaojin/tidba: TiDB 数据库 DBA 常用工具集

| username: Hacker_zKg8MmGa | Original post link

After the transfer, the result is still incorrect. I can’t find my t6 data at all.

| username: Hacker_zKg8MmGa | Original post link

The data in my table should start with this, but one of the scanned entries is obviously larger than this.

| username: GangShen | Original post link

Try the mok tool: GitHub - oh-my-tidb/mok: master of keys

| username: redgame | Original post link

You can use the scan-region command of tikv-ctl to check if the Region where the key is located has changed.