- 03 Jul, 2017 1 commit
-
-
antirez authored
This commit closes issue #3698, at least for now, since the root cause was not fixed: the bounding box function, for huge radiuses, does not return a correct bounding box, there are points still within the radius that are left outside. So when using GEORADIUS queries with radiuses in the order of 5000 km or more, it was possible to see, at the edge of the area, certain points not correctly reported. Because the bounding box for now was used just as an optimization, and such huge radiuses are not common, for now the optimization is just switched off when the radius is near such magnitude. Three test cases found by the Continuous Integration test were added, so that we can easily trigger the bug again, both for regression testing and in order to properly fix it as some point in the future.
-
- 20 Dec, 2016 1 commit
-
-
antirez authored
We need to report all the points added into the set, not just the ones matching the Tcl distance algo.
-
- 05 Dec, 2016 1 commit
-
-
antirez authored
The test now uses more diverse radius sizes, especially sizes near or greater the whole earth surface are used, that are known to trigger edge cases. Moreover the PRNG seeding was probably resulting into the same sequence tested over and over again, now seeding unsing the current unix time in milliseconds. Related to #3631.
-
- 27 Jul, 2016 1 commit
-
-
antirez authored
By grepping the continuous integration errors log a number of GEORADIUS tests failures were detected. Fortunately when a GEORADIUS failure happens, the test suite logs enough information in order to reproduce the problem: the PRNG seed, coordinates and radius of the query. By reproducing the issues, three different bugs were discovered and fixed in this commit. This commit also improves the already good reporting of the fuzzer and adds the failure vectors as regression tests. The issues found: 1. We need larger squares around the poles in order to cover the area requested by the user. There were already checks in order to use a smaller step (larger squares) but the limit set (+/- 67 degrees) is not enough in certain edge cases, so 66 is used now. 2. Even near the equator, when the search area center is very near the edge of the square, the north, south, west or ovest square may not be able to fully cover the specified radius. Now a test is performed at the edge of the initial guessed search area, and larger squares are used in case the test fails. 3. Because of rounding errors between Redis and Tcl, sometimes the test signaled false positives. This is now addressed. Whenever possible the original code was improved a bit in other ways. A debugging example stanza was added in order to make the next debugging session simpler when the next bug is found.
-
- 18 Feb, 2016 1 commit
-
-
antirez authored
-
- 06 Oct, 2015 1 commit
-
-
antirez authored
-
- 14 Sep, 2015 1 commit
-
-
antirez authored
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.
-
- 09 Jul, 2015 1 commit
-
-
antirez authored
Rationale: 1. The commands look like internals exposed without a real strong use case. 2. Whatever there is an use case, the client would implement the commands client side instead of paying RTT just to use a simple to reimplement library. 3. They add complexity to an otherwise quite straightforward API. So for now KILLED ;-)
-
- 29 Jun, 2015 4 commits
- 27 Jun, 2015 1 commit
-
-
antirez authored
-
- 26 Jun, 2015 1 commit
-
-
antirez authored
The GIS standard and all the major DBs implementing GIS related functions take coordinates as x,y that is longitude,latitude. It was a bad start for Redis to do things differently, so even if this means that existing users of the Geo module will be required to change their code, Redis now conforms to the standard. Usually Redis is very backward compatible, but this is not an exception to this rule, since this is the first Geo implementation entering the official Redis source code. It is not wise to try to be backward compatible with code forks... :-) Close #2637.
-
- 24 Jun, 2015 2 commits
-
-
antirez authored
-
antirez authored
We set random points in the world, pick a random position, and check if the returned points by Redis match the ones computed by Tcl by brute forcing all the points using the distance between two points formula. This approach is sounding since immediately resulted in finding a bug in the original implementation.
-
- 23 Jun, 2015 1 commit
-
-
antirez authored
-
- 22 Jun, 2015 3 commits
-
-
antirez authored
-
antirez authored
Server output is matched to a pre-computed output. The last digits differ because of rouding errors.
-
Matt Stancliff authored
Current todo: - replace functions in zset.{c,h} with a new unified Redis zset access API. Once we get the zset interface fixed, we can squash relevant commits in this branch and have one nice commit to merge into unstable. This commit adds: - Geo commands - Tests; runnable with: ./runtest --single unit/geo - Geo helpers in deps/geohash-int/ - src/geo.{c,h} and src/geojson.{c,h} implementing geo commands - Updated build configurations to get everything working - TEMPORARY: src/zset.{c,h} implementing zset score and zset range reading without writing to client output buffers. - Modified linkage of one t_zset.c function for use in zset.c Conflicts: src/Makefile src/redis.c
-