`GEOSEARCH` / `GEORADIUS` with a negative radius hangs
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 25/100
Research direction
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.
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 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!
- Dominant language
- C++
- Stars
- 4.5k
- Forks
- 686
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 37
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
-
`BLMPOP` with COUNT 0 or numkeys 0 hangsPossibly taken @ggyuchive claimed this today. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
HSETEXPIRE with an overflowing TTL returns OK and deletes the whole hashPossibly taken @anubhavgupta121 claimed this 16 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 1 day
-
`ZDIFFSTORE` and `ZINTERSTORE` with numkeys 0 crash the server (SIGSEGV)Possibly taken @siddiqueirshad claimed this 7 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 1 day 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 12 days ago. Openbug
Difficulty 4/5 3-5 days Newbie friendliness 50/100
Maintainers usually reply within 1 day
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
pocoproject/poco#5636 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
microsoft/cppwinrt#1646 · 7 comments ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
[BUG] Segfault when all runs of a Complexity() benchmark are skippedPossibly taken @nitanshnagpal claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 81/100