tikv / tikv/client-rust

UnexpectedWireType for Raw batch_put() api

Open
#380 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
425
Forks
163
Avg merge
10h 51m
Merged PRs (30d)
3

Description

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)))

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with RawClient::batch_put and reproduce the example against TiKV v6.1.3, then compare its response handling with TiKV v4.0. Trace the response deserialization path to identify the incompatible wire type; done means the supplied batch_put example completes without the UnexpectedWireType error.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
database
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.