After importing data into the TiKV cluster using the built-in importer tool, no data can be found

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

Original topic: 用自带的importer工具导入数据到tikv集群后,查不到数据

| username: 我家有个臭皮崽

After importing data into the TiKV cluster using the tikv-importer tool, I found that the imported data could not be found when queried through TiKV:
The import process is as follows, where the client is a gRPC client implementing the proto in kvproto/proto/import_kvpb.proto at ecdbf1f8c130089392a9bb5f86f7577deddfbed5 · pingcap/kvproto · GitHub

| username: xfworld | Original post link

Try scanning keys using the tikv cli command line.

| username: 我家有个臭皮崽 | Original post link

Didn’t find it either.

| username: xfworld | Original post link

Probably didn’t write it in… :face_with_spiral_eyes:

| username: 我家有个臭皮崽 | Original post link

I see there are SST files.

| username: 我家有个臭皮崽 | Original post link

This is the importer’s log.

| username: xfworld | Original post link

But there are no keys, how can you find the value…

Is it possible that the version you’re using is incorrect…

Try using PD to check the region and see the specific data of the region.

| username: 我家有个臭皮崽 | Original post link

Running this now will result in an error.

| username: 我家有个臭皮崽 | Original post link

The region shows that there are 3 key-values.

| username: 我家有个臭皮崽 | Original post link

The version being used is 4.0.2, and TiKV is 6.1.0.

| username: xfworld | Original post link

The version is not correct, right…


The keys in here have no range, so how do you read them? :rofl:

| username: 我家有个臭皮崽 | Original post link

There should be an issue with this region if there is no range, but the data does have a range. I don’t know why the startkey of this region hasn’t been updated.

| username: 我家有个臭皮崽 | Original post link

Which version do you recommend? I’ll give it a try. :joy:

| username: 我家有个臭皮崽 | Original post link

After I pre-partitioned, scanning this partition still has issues.

| username: xfworld | Original post link

However, the range of keys is there…

This tool hasn’t been updated…
It doesn’t match the TiDB version at all… :rofl:

Sorry, I can’t help at all…

| username: 我家有个臭皮崽 | Original post link

This range was obtained by partitioning first.

| username: 我家有个臭皮崽 | Original post link

So if I don’t use this tool, is there another tool like this: I will generate kv, the order of kv is unknown, and then write to this tool using the batchWrite method. After writing, upload the generated SST file to TiKV through this tool.

| username: 我家有个臭皮崽 | Original post link

Here I mainly use TiKV as the storage engine and do not use TiDB.

| username: xfworld | Original post link

You can use the officially recommended client tools, TiKV | Java Client

There are many languages,
image

| username: 我家有个臭皮崽 | Original post link

However, I am using C++ and need to load a large amount of data…