SSCAN, HSCAN, ZSCAN don't finish when an empty-string member is returned at the end of a page
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 77/100
Research direction
Start at the SSCAN, HSCAN, and ZSCAN implementations and their cursor pagination tests; reproduce the issue with the provided SADD and repeated SSCAN commands using COUNT 1. Trace how an empty member is handled at the end of a page and how the cursor advances. Done when all three commands finish scanning and return the empty-string member without repeating the same page.
Written by the indexing model from the issue text.
Description
Search before asking
- I had searched in the issues and found no similar issues.
Version
Kvrocks unstable at commit baa1da67b3
Minimal reproduce step
SADD s "" 10
SSCAN s 0 COUNT 1
SSCAN s <cursor from the previous reply> COUNT 1
... repeat with each returned cursor
What did you expect to see?
> SSCAN s 0 COUNT 1
1) "0"
2) 1) ""
2) "10"
What did you see instead?
> SSCAN s 0 COUNT 1
1) "8038996045349715968"
2) 1) ""
> SSCAN s 8038996045349715968 COUNT 1
1) "8038996045349715969"
2) 1) ""
> SSCAN s 8038996045349715969 COUNT 1
1) "8038996045349715970"
2) 1) ""
(the same page forever)
Anything Else?
No response
Are you willing to submit a PR?
- I'm willing to submit a PR!
- Dominant language
- C++
- Stars
- 4.5k
- Forks
- 686
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 40
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- Ships a Dockerfile or Docker Compose file
- No pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/kvrocks
-
HSETEXPIRE with an overflowing TTL returns OK and deletes the whole hashPossibly taken @anubhavgupta121 claimed this 17 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 1 day
-
`GEOSEARCH` / `GEORADIUS` with a negative radius hangsPossibly taken @ggyuchive claimed this 6 days ago. Openbug
Difficulty 3/5 1-2 days Newbie friendliness 25/100
Maintainers usually reply within 1 day
-
`ZDIFFSTORE` and `ZINTERSTORE` with numkeys 0 crash the server (SIGSEGV)Possibly taken @siddiqueirshad claimed this 8 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
Maintainers usually reply within 1 day
-
Support the `SUNIONCARD` commandPossibly taken @PoisonGodv claimed this 2 days ago. Openenhancement
Difficulty 3/5 1-2 days Newbie friendliness 58/100
apache/kvrocks#3723 · 1 comment ·
Maintainers usually reply within 1 day
-
`NAMESPACE ADD/SET/DEL` and `CONFIG REWRITE` rewrite `kvrocks.conf` without fsync: after a power loss new namespaces vanish, and deleted namespaces / rotated tokens are valid againPossibly taken @Tyagiquamar claimed this 14 days ago. Openbug
Difficulty 4/5 3-5 days Newbie friendliness 50/100
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
llvm/offload-test-suite#1703 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
BGI-shenzhen/PopLDdecay#25 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 1-3 hours Newbie friendliness 68/100
eic/TimeframeBuilder#102 ·