Skip to content
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

UnexpectedWireType for Raw batch_put() api #380

Open
ycytt-rs opened this issue Dec 12, 2022 · 0 comments
Open

UnexpectedWireType for Raw batch_put() api #380

ycytt-rs opened this issue Dec 12, 2022 · 0 comments

Comments

@ycytt-rs
Copy link

ycytt-rs commented Dec 12, 2022

batch_put() api would give the following error:

gRPC error: RpcFailure: 13-INTERNAL Failed to deserialize response message: Codec(WireError(UnexpectedWireType(WireTypeLengthDelimited)))

tikv server: v6.1.3

I also tested tikv v4.0. It does not throw this error.

Example:

use tikv_client::{KvPair, RawClient};

#[tokio::main]
async fn main() -> Result<(), ()> {
    let client = RawClient::new(vec!["127.0.0.1:12379"], None).await.unwrap();
    let kvpair1: KvPair = KvPair("PD".to_owned().into(), "Go".to_owned().into());
    let kvpair2: KvPair = KvPair("TiKV".to_owned().into(), "Rust".to_owned().into());
    let pairs: Vec<KvPair> = vec![kvpair1, kvpair2];

    match client.batch_put(pairs).await {
        Ok(_) => println!("pairs are inserted"),
        Err(e) => println!("error: {}", e),
    };

    Ok(())
}

Output:

Dec 12 10:53:08.427 INFO connect to tikv endpoint: "127.0.0.1:20160"
error: gRPC error: RpcFailure: 13-INTERNAL Failed to deserialize response message: Codec(WireError(UnexpectedWireType(WireTypeLengthDelimited)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant