-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Transaction::batch_get should return Result<Vec<KvPair>> #326
Comments
Could you provide an example? |
Sample Code: use tikv_client::TransactionClient;
use tokio::runtime::Runtime;
async fn tikv_test() {
let pd_addrs = vec![String::from("127.0.0.1:2379")];
let conn = TransactionClient::new(pd_addrs).await.unwrap();
let mut txn = conn.begin_pessimistic().await.unwrap();
txn.batch_get(vec![String::from("key1"), String::from("key2")]).await;
}
fn main() {
let runtime = Runtime::new().unwrap();
runtime.spawn(async move {
tikv_test().await;
});
runtime.block_on(async {
tikv_test().await;
});
println!("Hello, world!");
}
|
I see. It's been fixed in #297. You could try it on the master branch. |
@ekexium It works for master branch. Thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Transaction::batch_get
should returnResult<Vec<KvPair>>
asRawClient
do.Currently
Result<impl Iterator<Item = KvPair>>
not implements Copy trait so it cannot compile intokio::spawn
async block.The text was updated successfully, but these errors were encountered: