Skip to content

InvalidReqRange with scan_reverse #436

@jmhrpr

Description

@jmhrpr

Hello,

It seems there is some issue which results in InvalidReqRange error where the start key of the region is greater than the start key of the request, which is triggered by the following check in TiKV:
https://github.com/tikv/tikv/blob/master/src/storage/txn/store.rs#L465-L477

It appears that when using scan_reverse the start and end keys are swapped, such that the greater key is the start key. But, in store_stream_for_range the range_intersection function appears to always treat the start key of the request range (bnd_range) as the lower key and the end key as the upper key when comparing with the region range, which breaks the lower bound of the resulting range for the store. Perhaps this is the issue?

https://github.com/tikv/client-rust/blob/master/src/store/mod.rs#L79-L112

Thanks

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