`GEOSEARCH` / `GEORADIUS` with a negative radius hangs

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

I maintainer di solito rispondono entro 1 giorno

@ggyuchive ci sta già lavorando.

Dal 30/10/2026.

  • #3737 di @ggyuchive — aperta

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
25/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
cpp
Ambito
databases

Direzione di ricerca

Start at the reported call path from redis::CommandGeoRadius::Execute through redis::Geo::Radius and SearchStore to GeoHashHelper::GetAreasByShapeWGS84 in geohash.cc:362 and :376. Run the reproduction for both GEOSEARCH and GEORADIUS; done means each negative radius returns an error instead of hanging, and the server still answers PING.

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 71f3810d1b (71f3810d1b8cfd4a8ca867b0fca6659e3d863ad2).

Minimal reproduce step

Start an empty server and run:

GEOADD g 1 1 m
GEOSEARCH g FROMLONLAT 1 1 BYRADIUS -1 km
What did you expect to see?
> GEOADD g 1 1 m
(integer) 1
> GEOSEARCH g FROMLONLAT 1 1 BYRADIUS -1 km
(error) ERR radius cannot be negative
> GEORADIUS g 1 1 -1 km
(error) ERR radius cannot be negative
What did you see instead?
> GEOADD g 1 1 m
(integer) 1
> GEOSEARCH g FROMLONLAT 1 1 BYRADIUS -1 km
(no reply)
Anything Else?

The command never returns, and PING on a new connection also stopped answering. GEORADIUS g 1 1 -1 km behaves the same.

redis::CommandGeoRadius::Execute
  redis::Geo::Radius
    redis::Geo::SearchStore
      GeoHashHelper::GetAreasByShapeWGS84(GeoShape&)   geohash.cc:362
        GeoHashHelper::GetAreasByShapeWGS84(GeoShape&) geohash.cc:376
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

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.