SSCAN, HSCAN, ZSCAN don't finish when an empty-string member is returned at the end of a page

Aperta
#3,758 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@ggyuchive ci sta già lavorando.

Dal 5/11/2026.

  • #3759 di @ggyuchive — aperta

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
77/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
cpp, redis
Ambito
backend, database

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug
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!
Lingua principale
C++
Stelle
4.5k
Fork
686
Merge medio
2g 1h
PR unite (30g)
35

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

  • Include un Dockerfile o un file Docker Compose
  • Nessun modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di apache/kvrocks

Tutte le issue di apache/kvrocks

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.