1. 15 Jul, 2015 1 commit
    • antirez's avatar
      SDS: New sds type 5 implemented. · 0ab27a45
      antirez authored
      This is an attempt to use the refcount feature of the sds.c fork
      provided in the Pull Request #2509. A new type, SDS_TYPE_5 is introduced
      having a one byte header with just the string length, without
      information about the available additional length at the end of the
      string (this means that sdsMakeRoomFor() will be required each time
      we want to append something, since the string will always report to have
      0 bytes available).
      
      More work needed in order to avoid common SDS functions will pay the
      cost of this type. For example both sdscatprintf() and sdscatfmt()
      should try to upgrade to SDS_TYPE_8 ASAP when appending chars.
      0ab27a45
  2. 14 Jul, 2015 4 commits
  3. 13 Jul, 2015 2 commits
    • antirez's avatar
      EXISTS is now variadic. · 4c7ee0d5
      antirez authored
      The new return value is the number of keys existing, among the ones
      specified in the command line, counting the same key multiple times if
      given multiple times (and if it exists).
      
      See PR #2667.
      4c7ee0d5
    • antirez's avatar
      Geo: fix command table keys position indexes for three commands. · 5c4fcaf3
      antirez authored
      GEOHASH, GEOPOS and GEODIST where declared as commands not accepting
      keys, so the Redis Cluster redirection did not worked.
      
      Close #2671.
      5c4fcaf3
  4. 09 Jul, 2015 3 commits
  5. 06 Jul, 2015 1 commit
  6. 03 Jul, 2015 1 commit
  7. 01 Jul, 2015 1 commit
  8. 29 Jun, 2015 14 commits
  9. 27 Jun, 2015 3 commits
  10. 26 Jun, 2015 1 commit
    • antirez's avatar
      Geo: from lat,lon API to lon,lat API according to GIS standard · fa9d62d3
      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.
      fa9d62d3
  11. 24 Jun, 2015 5 commits
    • antirez's avatar
      03ce1896
    • antirez's avatar
      Geo: GEOHASH command test. · 5fd756bf
      antirez authored
      5fd756bf
    • antirez's avatar
    • antirez's avatar
      Geo: Fix geohashEstimateStepsByRadius() step underestimation. · 55c4a365
      antirez authored
      The returned step was in some case not enough towards normal
      coordinates (for example when our search position was was already near the
      margin of the central area, and we had to match, using the east or west
      neighbor, a very far point). Example:
      
          geoadd points 67.575457940146066 -62.001317572780565 far
          geoadd points 66.685439060295664 -58.925040587282297 center
          georadius points 66.685439060295664 -58.925040587282297 200 km
      
      In the above case the code failed to find a match (happens at smaller
      latitudes too) even if far and center are at less than 200km.
      
      Another fix introduced by this commit is a progressively larger area
      towards the poles, since meridians are a lot less far away, so we need
      to compensate for this.
      
      The current implementation works comparably to the Tcl brute-force
      stress tester implemented in the fuzzy test in the geo.tcl unit for
      latitudes between -70 and 70, and is pretty accurate over +/-80 too,
      with sporadic false negatives.
      
      A more mathematically clean implementation is possible by computing the
      meridian distance at the specified latitude and computing the step
      according to it.
      55c4a365
    • antirez's avatar
      Geo: GEORADIUS fuzzy testing by reimplementing it in Tcl. · cf89a19f
      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.
      cf89a19f
  12. 23 Jun, 2015 4 commits