Skip to content

BatchPut panics when keys are spread across regions #458

@limbooverlambda

Description

@limbooverlambda

There is a bug in the client where the ttls are not properly sharded for RawBatchPuts. This essentially means that if the batch is spread across multiple regions, the ttls for the batch specific to the shard is not properly aligned. This is an issue when the request ends up in the TiKV node specific to the region and fails because of the misalignment of the Vec with its corresponding Vec. This results in TiKV panicking with "The length of ttls does not equal to the length of pairs". The fix was to change the sharding logic for RawBatchPutRequest so that the TTLs are aligned with the KvPair.

Here's the PR with the fix: #457

@pingyu @andylokandy @ekexium

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions