Commit Graph

144 Commits

Author SHA1 Message Date
antirez
eaa713e93b geohash.c and geohash_helper.c are part of Redis.
They were under /deps since they originate from a different source tree,
however at this point they are very modified and we took ownership of
both the files making changes, fixing bugs, so there is no upgrade path
from the original code tree.

Given that, better to move the code under /src with proper dependencies
and with a more simpler editing experience.
2016-07-06 16:02:38 +02:00
antirez
b46239e58b Expire and LRU related code moved into different files. 2016-07-06 15:24:06 +02:00
antirez
0610683d5e Makefile: don't build dependencies file for clean, distclean. 2016-07-06 12:56:43 +02:00
antirez
10361829f9 Generate Makefile.dep at every build.
Normally we used to update it from time to time. Too fragile... better
to generate dependencies at every run and delete them on 'make clean'.
2016-07-06 12:24:48 +02:00
zach shipko
b7b9aa6d9b BSDs don't have -ldl 2016-06-14 13:46:42 +00:00
antirez
b09a6b6a5d Fix modules compilation when libc malloc is used.
Compiling Redis worked as a side effect of jemalloc target specifying
-ldl as needed linker options, otherwise it is not provided during
linking and dlopen() API will remain unresolved symbols.
2016-05-18 17:48:06 +02:00
antirez
6dead2cff5 Modules: first preview 31 March 2016. 2016-05-10 06:40:05 +02:00
antirez
0c05436cef Lazyfree: a first implementation of non blocking DEL. 2015-10-01 13:00:19 +02:00
antirez
cef054e868 RDMF (Redis/Disque merge friendlyness) refactoring WIP 1. 2015-07-26 15:17:18 +02:00
antirez
056a0ca199 Fix redis-benchmark sds binding.
Same as redis-cli, now redis-benchmark requires to use hiredis sds copy
since it is different compared to the memory optimized fork of Redis
sds.
2015-07-14 17:33:30 +02:00
Oran Agra
f15df8ba5d sds size classes - memory optimization 2015-07-14 17:17:06 +02:00
antirez
0b93139048 Geo: big refactoring of geo.c, zset.[ch] removed.
This commit simplifies the implementation in a few ways:

1. zsetScore implementation improved a bit and moved into t_zset.c where
   is now also used to implement the ZSCORE command.

2. Range extraction from the sorted set remains a separated
   implementation from the one in t_zset.c, but was hyper-specialized in
   order to avoid accumulating results into a list and remove the ones
   outside the radius.

3. A new type is introduced: geoArray, which can accumulate geoPoint
   structures in a vector with power of two expansion policy. This is
   useful since we have to call qsort() against it before returning the
   result to the user.

4. As a result of 1, 2, 3, the two files zset.c and zset.h are now
   removed, including the function to merge two lists (now handled with
   functions that can add elements to existing geoArray arrays) and
   the machinery used in order to pass zset results.

5. geoPoint structure simplified because of the general code structure
   simplification, so we no longer need to take references to objects.

6. Not counting the JSON removal the refactoring removes 200 lines of
   code for the same functionalities, with a simpler to read
   implementation.

7. GEORADIUS is now 2.5 times faster testing with 10k elements and a
   radius resulting in 124 elements returned. However this is mostly a
   side effect of the refactoring and simplification. More speed gains
   can be achieved by trying to optimize the code.
2015-06-23 08:42:57 +02:00
antirez
3d9031eda4 Geo: compile again with optimizations
For some reason the Geo PR included disabling the fact that Redis is
compiled with optimizations. Apparently it was just @mattsta attempt to
speedup the modify-compile-test iteration and there are no other
reasons.
2015-06-22 17:28:48 +02:00
antirez
b18c68aa7f Geo: JSON features removed
The command can only return data in the normal Redis protocol. It is up
to the caller to translate to JSON if needed.
2015-06-22 12:03:44 +02:00
Matt Stancliff
7f4ac3d19c [In-Progress] Add Geo Commands
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
2015-06-22 09:07:13 +02:00
Matt Stancliff
145473acc5 Convert check-dump to Redis check-rdb mode
redis-check-dump is now named redis-check-rdb and it runs
as a mode of redis-server instead of an independent binary.

You can now use 'redis-server redis.conf --check-rdb' to check
the RDB defined in redis.conf.  Using argument --check-rdb
checks the RDB and exits.  We could potentially also allow
the server to continue starting if the RDB check succeeds.

This change also enables us to use RDB checking programatically
from inside Redis for certain failure conditions.
2015-01-28 11:18:16 -05:00
antirez
0d22121c27 Add "-lrt" in Makefile for Solaris.
This fix is from @NanXiao, however I was not able to retain authorship
because the Pull Request original repository was removed.
2015-01-09 11:53:51 +01:00
Matt Stancliff
25e12d10be Set optional 'static' for Quicklist+Redis
This also defines REDIS_STATIC='' for building everything
inside src/ and everything inside deps/lua/.
2015-01-02 11:16:10 -05:00
Matt Stancliff
5e362b84ab Add quicklist implementation
This replaces individual ziplist vs. linkedlist representations
for Redis list operations.

Big thanks for all the reviews and feedback from everybody in
https://github.com/antirez/redis/pull/2143
2015-01-02 11:16:08 -05:00
Matt Stancliff
d01d4ddcbb Allow forcing non-jemalloc build 2014-12-23 09:31:03 -05:00
Rhommel Lamas
24f4c01832 Add redis-sentinel symlink to a relative path 2014-12-17 11:04:08 +01:00
Rhommel Lamas
7b72dbf599 Add symlink to redis-sentinel during make install 2014-12-12 22:59:31 +01:00
antirez
0195afae39 test-sds target in Makefile to run sds.c tests. 2014-12-10 09:50:27 +01:00
antirez
7e3ccddc6d Add -W to compilation flags. 2014-08-13 10:53:54 +02:00
NanXiao
951eefae3c Use resolv library in Solaris
For some Solaris flavours, the inet_aton in in resolv library.
Not linking this library will introduce link error.

Improves compatability with older Solaris and still
works on new Solaris.

Closes #1092
2014-08-12 11:30:46 +02:00
Joshua Anderson
7a2450a7e5 src/Makefile: Reword "to run make test" message
Closes #1610
2014-08-08 10:20:22 +02:00
siahl
009cabf103 Add support for compiling on AIX
Closes #1900
2014-08-07 12:12:54 +02:00
antirez
cc4df5a6b8 ASCII sparklines generation API. 2014-07-02 10:13:53 +02:00
antirez
d7a07a2012 Latency monitor: basic samples collection. 2014-07-01 11:30:15 +02:00
antirez
552eb5407a HLLSELFTEST command implemented.
To test the bitfield array of counters set/get macros from the Redis Tcl
suite is hard, so a specialized command that is able to test the
internals was developed.
2014-03-28 12:11:55 +01:00
antirez
a89c8bb87c Sentinel test: Makefile target added. 2014-02-28 16:00:00 +01:00
antirez
452dea30f6 Makefile: remove odd syntax not compatible with some make versions.
See issue #1448.
2013-12-12 15:19:39 +01:00
antirez
82b672f633 BLPOP blocking code refactored to be generic & reusable. 2013-12-03 17:43:53 +01:00
Johan Bergström
8080e1cfbe use install as default installer (except on SunOS) 2013-03-21 13:32:08 +11:00
Johan Bergström
dc4003be71 Silence mkdir output 2013-03-17 18:37:38 +11:00
Johan Bergström
348be19b5f Only pass -rdynamic as linker option 2013-03-17 17:49:57 +11:00
Johan Bergström
33a4bc2c70 Remove extra spaces 2013-03-17 17:23:45 +11:00
Johan Bergström
978c895b69 make check is a common naming convention for tests 2013-03-16 18:40:22 +11:00
Johan Bergström
ada7aa7ac9 Spaces to tabs 2013-03-16 18:35:20 +11:00
Johan Bergström
bea60bec75 Slightly refactor CFLAGS/LDFLAGS/LIBS
This way, we can avoid -rdynamic and -pthread warnings on darwin.
2013-03-16 18:33:42 +11:00
antirez
6356cf6808 Set process name in ps output to make operations safer.
This commit allows Redis to set a process name that includes the binding
address and the port number in order to make operations simpler.

Redis children processes doing AOF rewrites or RDB saving change the
name into redis-aof-rewrite and redis-rdb-bgsave respectively.

This in general makes harder to kill the wrong process because of an
error and makes simpler to identify saving children.

This feature was suggested by Arnaud GRANAL in the Redis Google Group,
Arnaud also pointed me to the setproctitle.c implementation includeed in
this commit.

This feature should work on all the Linux, OSX, and all the three major
BSD systems.
2013-02-26 11:52:12 +01:00
antirez
1a27d41156 Makefile: valgrind target added (forces -O0 and libc malloc). 2013-02-11 12:11:28 +01:00
antirez
4cdbce341e Keyspace events notification API. 2013-01-28 13:14:36 +01:00
antirez
2f62c9663c Introduced the Build ID in INFO and --version output.
The idea is to be able to identify a build in a unique way, so for
instance after a bug report we can recognize that the build is the one
of a popular Linux distribution and perform the debugging in the same
environment.
2012-11-29 14:20:08 +01:00
antirez
6b5daa2df2 First implementation of Redis Sentinel.
This commit implements the first, beta quality implementation of Redis
Sentinel, a distributed monitoring system for Redis with notification
and automatic failover capabilities.

More info at http://redis.io/topics/sentinel
2012-07-23 13:14:44 +02:00
antirez
80f8028e3c bitop.c renamed bitops.c
bitop.c contains the "Bit related string operations" so it seems more
logical to call it bitops instead of bitop.
This also makes it matching the name of the test (unit/bitops.tcl).
2012-05-24 15:20:06 +02:00
antirez
760e776526 Bit-related string operations moved to bitop.c
All the general string operations are implemented in t_string.c, however
the bit operations, while targeting the string type, are better served
in a specific file where we have the implementations of the following
four commands and helper functions:

    GETBIT
    SETBIT
    BITOP
    BITCOUNT

In the future this file will probably contain more code related to
making the BITOP and BITCOUNT operations faster.
2012-05-24 15:19:51 +02:00
antirez
8c6301462b Fix PREFIX typo in Makefile. 2012-05-09 20:45:19 +02:00
antirez
b26808a532 Allow PREFIX to be overrided in Makefile. 2012-05-09 10:34:52 +02:00
antirez
088c508abc redis-cli --pipe for mass import. 2012-05-07 16:37:18 +02:00