migrate-type redis-command: complex-key sub-field migration produces MOVED <wrong-slot>
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Stack tecnologico
- cpp, redis
- Ambito
- databases, distributed-systems
Direzione di ricerca
Parti dal percorso di migrazione di redis-command e dalle posizioni in slot_migrate.cc indicate nell'errore, quindi riproduci il caso a due shard con una chiave hash contenente il tag {T1}. Traccia come vengono codificate le sottochiavi delle chiavi complesse e come la destinazione calcola il loro slot. Il lavoro è completato quando la migrazione di redis-command per le chiavi hash con tag termina senza MOVED; fai il confronto con raw-key-value come baseline del workaround.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
With migrate-type redis-command, migrating a slot that contains a hash
key whose name has a {tag} aborts mid-stream:
[I][slot_migrate.cc:373] The key ij/staging/{N/<rand>/<id>} successfully migrated
[E][slot_migrate.cc:203] Failed to send snapshot of slot(s) <range>.
Error: failed to migrate a key ij/staging/{N/<rand>/<id>}:101:
failed to migrate complex key: failed to send commands to restore a key:
wrong response from the destination node:
got invalid response of length 61: -MOVED <slot> <host>:<port>
The slot number returned in the MOVED reply is different from
CLUSTER KEYSLOT <key> for the same key (we saw parent=5466 and the
reported MOVED=5465). The destination is computing the slot from an
encoded sub-key buffer that does not preserve the {tag} hashtag, so
the destination's command dispatcher believes that sub-key belongs to a
different slot it does not own → MOVED, abort.
Workaround
migrate-type raw-key-value transfers each key as a RocksDB blob and
does not decompose complex keys, so the sub-key hashing path is never
exercised. The same migration that fails with redis-command completes
in seconds with raw-key-value.
We recommend documenting raw-key-value as the preferred type for
production slot migration until the redis-command path is fixed.
Repro (vanilla setup)
- Two-shard cluster,
migrate-type redis-command(current default). - Insert a hash with a tag:
HSET ij/staging/{T1}:101 f1 v1 f2 v2. - Trigger slot migration that includes the slot of
{T1}. - Migration aborts with the MOVED error above.
Versions
- Apache Kvrocks 2.15.0
- 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
-
A blocked client that is woken but loses the element to another client is never woken againForse già presa @ggyuchive l’ha presa 1 giorno fa. Apertabug
Difficoltà 4/5 1-2 giorni Idoneità per principianti 55/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 3 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 9 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
Tutte le issue di apache/kvrocks
Issue simili
-
go perft exits when EvalFile is unavailableForse già presa @Muawiya-contact l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
official-stockfish/Stockfish#7292 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
arvidn/libtorrent#9149 ·
I maintainer di solito rispondono entro 1 giorno
-
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
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
hyprwm/xdg-desktop-portal-hyprland#453 · 1 commento ·