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

rawkv: scan return 0 kv pair while exist key ByteString.EMPTY #540

Closed
iosmanthus opened this issue Feb 28, 2022 · 2 comments · Fixed by #541
Closed

rawkv: scan return 0 kv pair while exist key ByteString.EMPTY #540

iosmanthus opened this issue Feb 28, 2022 · 2 comments · Fixed by #541
Assignees
Labels
severity/critical type/bug Something isn't working

Comments

@iosmanthus
Copy link
Member

Bug Report

1. Describe the bug

rawScan interface will return 0 KV-pair while there is an empty key inserted. It could be introduced by the warmup phase of client-java.

2. Minimal reproduce step (Required)

client.put(ByteString.EMPTY, ByteString.EMPTY);
System.out.println(client.scan(ByteString.EMPTY, 2).size());

3. What did you see instead (Required)

Output 1

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

Output 0

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

  • Client Java: master
  • TiKV: v5.0.3
@zz-jason
Copy link
Member

an empty value means the key does not exist, am I correct?

@iosmanthus
Copy link
Member Author

iosmanthus commented Feb 28, 2022

an empty value means the key does not exist, am I correct?

Not really, It means inserting a ByteString.EMPTY key into TiKV with any value.

@iosmanthus iosmanthus changed the title rawkv: scan return 0 kv pair while exist record ["" : ""] rawkv: scan return 0 kv pair while exist key ByteString.EMPTY Feb 28, 2022
marsishandsome pushed a commit that referenced this issue Mar 1, 2022
…541) (#548)

* rawkv: cherry-pick fix-scan-empty-key

Signed-off-by: iosmanthus <myosmanthustree@gmail.com>

* rawkv: fix missing parameters

Signed-off-by: iosmanthus <myosmanthustree@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity/critical type/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants