A blocked client that is woken but loses the element to another client is never woken again
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 55/100
Direzione di ricerca
Start by tracing the blocking list pop and wakeup flow described in the reproduction, especially WakeupBlockingConns and the client's write callback. Reproduce with two connections using the listed transaction, then inspect the blocking connection handling when the element is gone by the time its callback runs. Done when the blocked client receives y after the later RPUSH and the list is empty.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Search before asking
- I had searched in the issues and found no similar issues.
Version
Kvrocks unstable at commit c256cc6e31
Minimal reproduce step
Start an empty server and use two connections, A and B.
A> BLPOP k 0
B> MULTI
B> RPUSH k x
B> LPOP k
B> EXEC
B> RPUSH k y
B> LLEN k
What did you expect to see?
A> BLPOP k 0
(blocked)
B> MULTI
OK
B> RPUSH k x
QUEUED
B> LPOP k
QUEUED
B> EXEC
1) (integer) 1
2) "x"
B> RPUSH k y
(integer) 1
A: 1) "k"
2) "y"
B> LLEN k
(integer) 0
A stays blocked through the transaction and gets y.
What did you see instead?
A> BLPOP k 0
(blocked)
B> MULTI
OK
B> RPUSH k x
QUEUED
B> LPOP k
QUEUED
B> EXEC
1) (integer) 1
2) "x"
B> RPUSH k y
(integer) 1
A: (no reply)
B> LLEN k
(integer) 1
A never gets a reply, although y stays in the list.
Anything Else?
sequenceDiagram
participant A as Client A
participant S as Kvrocks
participant B as Client B
A->>S: BLPOP k 0
Note over S: k is empty, A is added to blocking_keys_[k]
B->>S: MULTI / RPUSH k x / LPOP k / EXEC
Note over S: RPUSH k x calls WakeupBlockingConns:<br/>A is removed from blocking_keys_[k] (pop_front)<br/>and its write event is enabled
Note over S: LPOP k takes x
S-->>B: 1) (integer) 1 2) "x"
Note over S: A's write callback runs after EXEC:<br/>nothing to pop, the write event is disabled,<br/>but A is not added back to blocking_keys_[k]
B->>S: RPUSH k y
Note over S: blocking_keys_[k] is empty, nobody is woken
S-->>B: (integer) 1
Note over A: blocked forever, y stays in k
Are you willing to submit a PR?
- I'm willing to submit a PR!
- Lingua principale
- C++
- Stelle
- 4.5k
- Fork
- 689
- Merge medio
- 2g 1h
- PR unite (30g)
- 35
Preparare l'ambiente
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
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di apache/kvrocks
-
HSETEXPIRE with an overflowing TTL returns OK and deletes the whole hashForse già presa @anubhavgupta121 l’ha presa 19 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
I maintainer di solito rispondono entro 1 giorno
-
SSCAN, HSCAN, ZSCAN don't finish when an empty-string member is returned at the end of a pageForse già presa @ggyuchive l’ha presa 2 giorni fa. Apertabug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 77/100
I maintainer di solito rispondono entro 1 giorno
-
`GEOSEARCH` / `GEORADIUS` with a negative radius hangsForse già presa @ggyuchive l’ha presa 8 giorni fa. Apertabug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 25/100
I maintainer di solito rispondono entro 1 giorno
-
`ZDIFFSTORE` and `ZINTERSTORE` with numkeys 0 crash the server (SIGSEGV)Forse già presa @siddiqueirshad l’ha presa 10 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 35/100
I maintainer di solito rispondono entro 1 giorno
-
Support the `SUNIONCARD` commandForse già presa @PoisonGodv l’ha presa 5 giorni fa. Apertaenhancement
Difficoltà 3/5 1-2 giorni Idoneità per principianti 58/100
apache/kvrocks#3723 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di apache/kvrocks
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
Niko1221/Strata#5560 · 2 commenti ·
I maintainer di solito rispondono entro 4 giorni
-
NVIDIA windows
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
要トリアージ 辞書
Difficoltà 1/5 1-3 ore Idoneità per principianti 86/100
yksr-melt/Meltype#1625 · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
[yugabyted] xcluster set_up and add_to_replication fail for database names containing - . or (Apertakind/bug priority/medium qa_automation
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
yugabyte/yugabyte-db#37324 ·
I maintainer di solito rispondono entro 1 giorno