Open tank-plus opened 2 years ago
Subject: Similar Issue and Potential Solution for TiKV Rust Client
Hello chaochaoyuyu19880105,
I noticed that you encountered a similar issue with the TiKV Rust client and wanted to provide some insights based on my experience. It seems that your problem is related to the following issue: link to the issue.
In my case, I found that using the master
branch of the repository should resolve the issue. However, I encountered some dependency conflicts with raft
and protobuf
. I also noticed that the project is undergoing version updates, as indicated by this pull request: link to the pull request.
To address the issue, I forked the project and started from tag 0.1.0
. I then applied the necessary fix and created a new tag 0.1.1
. You can use this version in your Cargo.toml
as follows:
[dependencies]
tikv-client = { git = "https://github.com/SwannHERRERA/client-rust", tag = "0.1.1" }
This approach worked for me and resolved the issue I was facing. I hope it helps you as well.
test code
error:
Send
Send
as this value is used across an await --> /home/yuchao/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/tikv-client-0.1.0/src/transaction/buffer.rs:97:61Box::new(undetermined_keys)
maybe used laterBox<dyn Iterator<Item = tikv_client::Key>>
which is notSend
Box::new(undetermined_keys)
is later dropped here --> /home/yuchao/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/tikv-client-0.1.0/src/transaction/buffer.rs:97:68tokio::spawn
--> /home/yuchao/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/tokio-1.21.0/src/task/spawn.rs:127:21tokio::spawn
error: could not compile
store
due to previous error