Skip to content

KVClient scan error #756

Open
Open

Description

@FelixZeng

Bug Report

1. KVClient scan error

It occurred exception when using the following method of org.tikv.txn.KVClient.
public List<Kvrpcpb.KvPair> scan(ByteString startKey, ByteString endKey, long version) throws GrpcException;

2. Minimal reproduce step (Required)

  1. Insert test data into TiKV using TwoPhaseCommitter successfully
    Test data contains several KV pairs, and all the keys start with "h[tikv-client-java]txn1`"

  2. Use KVClient.scan to get all the data of which the keys start with "h[tikv-client-java]txn1" KVClient.scan(ByteString.copyFromUtf8("h[tikv-client-java]txn1"),
    ByteString.copyFromUtf8("h[tikv-client-java]txn1a"), transactionStartTimestamp);

3. What did you see instead (Required)

Scan failed with exceptions like
org.tikv.common.exception.TiClientInternalException: Error scanning data from region.
org.tikv.common.exception.KeyException: tikv abort txn Error(InvalidKeyRangeMode { cmd: scan, storage_api_version: V2, range: (Some("78000000685B7469FF6B762D636C69656EFF742D6A6176615D74FF786E316000000000FB"), None) })

image image

4. What did you expect to see? (Required)

All the data of which the keys start with "h[tikv-client-java]txn1`"

5. What are your Java Client and TiKV versions? (Required)

  • Client Java: 3.3.4
  • TiKV: v6.1.1

Activity

  1. added a commit that references this issue on Jul 8, 2026
    d32b30e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions