redict/tests/unit
antirez 3c23b5ffd0 GEORADIUS: Don't report duplicates when radius is huge.
Georadius works by computing the center + neighbors squares covering all
the area of the specified position and radius. Then a distance filter is
used to remove elements which are actually outside the range.

When a huge radius is used, like 5000 km or more, adjacent neighbors may
collide and be the same, leading to the reporting of the same element
multiple times. This only happens in the edge case of huge radius but is
not ideal.

A robust but slow solution would involve qsorting the range to remove
all the duplicates. However since the collisions are only in adjacent
boxes, for the way they are ordered in the code, it is much faster to
just check if the current box is the same as the previous one processed.

This commit adds a regression test for the bug.

Fixes #2767.
2015-09-14 23:10:50 +02:00
..
type Test: print info on HSTRLEN test failure. 2015-09-07 11:14:52 +02:00
aofrw.tcl Add quicklist implementation 2015-01-02 11:16:08 -05:00
auth.tcl Remove trailing spaces from tests 2014-09-29 06:49:08 -04:00
bitops.tcl Remove trailing spaces from tests 2014-09-29 06:49:08 -04:00
dump.tcl Increase test size for migrating large values 2015-01-02 11:16:09 -05:00
expire.tcl Test: regression test for issue #1026. 2013-03-28 11:46:14 +01:00
geo.tcl GEORADIUS: Don't report duplicates when radius is huge. 2015-09-14 23:10:50 +02:00
hyperloglog.tcl HyperLogLog regression test for issue #1762. 2014-05-19 15:44:04 +02:00
introspection.tcl Remove trailing spaces from tests 2014-09-29 06:49:08 -04:00
keyspace.tcl Test: MOVE expire test improved. 2015-09-14 12:35:55 +02:00
latency-monitor.tcl LATENCY command / monitor basic tests. 2014-07-10 16:23:54 +02:00
limits.tcl More robust maxclients test. 2012-04-18 11:34:18 +02:00
maxmemory.tcl Remove trailing spaces from tests 2014-09-29 06:49:08 -04:00
memefficiency.tcl Faster memory efficiency test. 2015-02-10 14:47:45 +01:00
multi.tcl Test: test replication of MULTI/EXEC. 2013-03-27 11:44:50 +01:00
obuf-limits.tcl Test: obuf-limits test false positive removed. 2013-03-25 11:56:34 +01:00
other.tcl Test: MULTI/EXEC tests moved into multi.tcl. 2012-11-22 10:32:12 +01:00
printver.tcl Print version info before running the test 2011-05-20 11:44:54 +02:00
protocol.tcl Return proper error on requests with an unbalanced number of quotes. 2013-12-08 12:58:12 +02:00
pubsub.tcl pubsub: Return integers for NUMSUB, not strings 2014-08-08 11:19:37 +02:00
quit.tcl Add tests for OK on QUIT 2010-10-15 12:54:53 +02:00
scan.tcl Regression test for issue #2175. 2014-12-03 10:38:56 +01:00
scripting.tcl Added <count> parameter to SPOP: 2014-12-14 12:25:42 +02:00
slowlog.tcl Slowlog: don't log EXEC but just the executed commands. 2013-01-19 12:53:21 +01:00
sort.tcl Config: Add quicklist, remove old list options 2015-01-02 11:16:10 -05:00