Commit Graph

287 Commits

Author SHA1 Message Date
antirez
bdcb92f273 shareobjects feautres killed - no gains most of the time, but VM complexities 2010-04-09 17:13:39 +02:00
antirez
4005fef124 Now PUBLISH commands are replicated to slaves 2010-04-02 16:42:15 +02:00
Jeremy Zawodny
b3f83f1272 support for include directive in config parser 2010-03-19 22:24:17 -07:00
antirez
cbba7dd7c9 HSET fixes, now the new pointer is stored back in the object pointer field 2010-03-07 23:41:48 +01:00
antirez
5921aa36ed Bug #169 fixed (BLOP/BRPOP interrupted connections are not cleared from the queue) 2010-02-27 12:26:08 +01:00
antirez
ce8330208a Saner VM defaults for redis.conf 2010-02-10 15:59:09 +01:00
antirez
6766f45ef2 multi bulk requests in redis-benchmark, default fsync policy changed to everysec, added a prefix character for DEBUG logs 2010-02-06 13:39:07 +01:00
antirez
054e426dbd support for named VM swap file. Fixed a few important interaction issues between the background saving processes and IO threads 2010-01-15 13:14:23 -05:00
antirez
72e9fd40b6 support for blocking VM in config file 2010-01-12 15:23:52 -05:00
antirez
92f8e88204 non-blocking VM data structures, just a start 2010-01-09 12:46:52 -05:00
antirez
c9e5c23d5b vm-enabled set to no by default in redis.conf 2010-01-06 21:05:03 -05:00
antirez
38aba9a121 a new default redis.conf 2010-01-06 21:03:16 -05:00
antirez
7d98e08c0a VM stats in INFO command 2010-01-06 20:14:27 -05:00
antirez
f870935d3e Introduced a new log verbosity level, so now DEBUG is really for debugging. Refactored a bit maxmemory. When virtual memory is short in RAM free the objects freelist as well as swapping things out. 2010-01-06 09:15:17 -05:00
antirez
e7546c6393 BGREWRITEAOF now works with swapping on 2010-01-05 19:15:15 -05:00
antirez
4ef8de8ad7 basic VM mostly working! 2010-01-05 12:46:59 -05:00
antirez
a35ddf129c more object-level VM primitives 2010-01-05 07:19:09 -05:00
antirez
b055378971 LZF compression re-enabled by default, but with INIT_HTAB set to 0 to avoid the very costly memset initialization. Note that with this option set valgrind will output some false positive about lzf_c.c 2009-12-16 15:48:57 -05:00
antirez
121f70cfae lzf compression switched off by default now, with config file option to enable it in redis.conf 2009-12-16 11:28:41 -05:00
antirez
49b99ab43e Changed the reply of BGSAVE and BGREWRITEAOF from +OK to a more meaningful message that makes the user aware of an operation that just started and is not yet finished. 2009-12-13 16:52:43 +01:00
antirez
3f477979b3 TODO list modified. What's planned for 1.4 is now written in the stone ;) 2009-12-12 19:42:42 +01:00
antirez
4e141d5a21 append only mode is now able to translate EXPIRE into EXPIREAT transparently 2009-10-30 17:20:24 +01:00
antirez
0154acdc57 appendfsync is now set to NO by default 2009-10-30 16:35:16 +01:00
antirez
48f0308ad3 support for appendonly mode no, always, everysec 2009-10-30 13:48:53 +01:00
antirez
44b38ef432 Initial implementation of append-only mode. Loading still not implemented. 2009-10-30 01:04:17 +01:00
antirez
e52c65b90a shareobjectspoolsize implemented in reds.conf, in order to control the pool size when object sharing is on 2009-06-03 16:01:32 +02:00
antirez
144d479b7c minor fix for Solaris boxes 2009-05-28 18:25:22 +02:00
antirez
3fd78bcd45 maxmemory implemented 2009-05-27 22:53:20 +02:00
antirez
285add5558 maxclients implemented, see redis.conf for details 2009-05-25 23:29:18 +02:00
Aman Gupta
0150db364d Allow timeout=0 config to disable client timeouts 2009-05-19 22:36:11 -07:00
antirez
b8b553c84f ability to specify a different file name for the DB 2009-04-27 18:10:00 +02:00
antirez
290deb8b8c TODO changes, minor change to default redis.conf 2009-04-08 13:46:26 +02:00
antirez
f2aa84bd63 Lua client added thanks to Daniele Alessandri 2009-03-26 17:23:51 +01:00
Brian Hammond
abcb223ec0 Adds AUTH command.
$ make
cc -c -O2 -Wall -W -DSDS_ABORT_ON_OOM -g  adlist.c
cc -c -O2 -Wall -W -DSDS_ABORT_ON_OOM -g  ae.c
cc -c -O2 -Wall -W -DSDS_ABORT_ON_OOM -g  anet.c
cc -c -O2 -Wall -W -DSDS_ABORT_ON_OOM -g  dict.c
cc -c -O2 -Wall -W -DSDS_ABORT_ON_OOM -g  redis.c
cc -c -O2 -Wall -W -DSDS_ABORT_ON_OOM -g  sds.c
cc -c -O2 -Wall -W -DSDS_ABORT_ON_OOM -g  zmalloc.c
cc -o redis-server -O2 -Wall -W -DSDS_ABORT_ON_OOM -g adlist.o ae.o anet.o dict.o redis.o sds.o zmalloc.o

Hint: To run the test-redis.tcl script is a good idea.
Launch the redis server with ./redis-server, then in another
terminal window enter this directory and run 'make test'.

cc -c -O2 -Wall -W -DSDS_ABORT_ON_OOM -g  benchmark.c
cc -o redis-benchmark -O2 -Wall -W -DSDS_ABORT_ON_OOM -g ae.o anet.o benchmark.o sds.o adlist.o zmalloc.o
cc -c -O2 -Wall -W -DSDS_ABORT_ON_OOM -g  redis-cli.c
cc -o redis-cli -O2 -Wall -W -DSDS_ABORT_ON_OOM -g anet.o sds.o adlist.o redis-cli.o zmalloc.o

$ tail -1 redis.conf

$ ./redis-server redis.conf &
[1] 52494
$ - Server started, Redis version 0.08
- DB loaded from disk
- The server is now ready to accept connections on port 6379
. 0 clients connected (0 slaves), 1932 bytes in use

$ make test
tclsh test-redis.tcl
DEL all keys to start with a clean DB                                  . Accepted 127.0.0.1:54490
PASSED
SET and GET an item                                                    PASSED
DEL against a single item                                              PASSED
KEYS with pattern                                                      PASSED
KEYS to get all keys                                                   PASSED
DBSIZE                                                                 PASSED
DEL all keys                                                           PASSED
Very big payload in GET/SET                                            PASSED
SET 10000 numeric keys and access all them in reverse order            . DB 0: 10001 keys in 16384 slots HT.
. 1 clients connected (0 slaves), 4885707 bytes in use
PASSED
DBSIZE should be 10001 now                                             PASSED
INCR against non existing key                                          PASSED
INCR against key created by incr itself                                PASSED
INCR against key originally set with SET                               PASSED
SETNX target key missing                                               PASSED
SETNX target key exists                                                PASSED
EXISTS                                                                 PASSED
Zero length value in key. SET/GET/EXISTS                               PASSED
Commands pipelining                                                    PASSED
Non existing command                                                   PASSED
Basic LPUSH, RPUSH, LLENGTH, LINDEX                                    PASSED
DEL a list                                                             PASSED
Create a long list and check every single element with LINDEX          PASSED
Test elements with LINDEX in random access                             PASSED
LLEN against non-list value error                                      PASSED
LINDEX against non-list value error                                    PASSED
LPUSH against non-list value error                                     PASSED
RPUSH against non-list value error                                     PASSED
RENAME basic usage                                                     PASSED
RENAME source key should no longer exist                               PASSED
RENAME against already existing key                                    PASSED
RENAMENX basic usage                                                   PASSED
RENAMENX against already existing key                                  PASSED
RENAMENX against already existing key (2)                              PASSED
RENAME against non existing source key                                 PASSED
RENAME where source and dest key is the same                           PASSED
DEL all keys again (DB 0)                                              PASSED
DEL all keys again (DB 1)                                              PASSED
MOVE basic usage                                                       PASSED
MOVE against key existing in the target DB                             PASSED
SET/GET keys in different DBs                                          PASSED
Basic LPOP/RPOP                                                        PASSED
LPOP/RPOP against empty list                                           PASSED
LPOP against non list value                                            PASSED
Mass LPUSH/LPOP                                                        PASSED
LRANGE basics                                                          PASSED
LRANGE inverted indexes                                                PASSED
LRANGE out of range indexes including the full list                    PASSED
LRANGE against non existing key                                        PASSED
LTRIM basics                                                           PASSED
LSET                                                                   PASSED
LSET out of range index                                                PASSED
LSET against non existing key                                          PASSED
LSET against non list value                                            PASSED
SADD, SCARD, SISMEMBER, SMEMBERS basics                                PASSED
SADD adding the same element multiple times                            PASSED
SADD against non set                                                   PASSED
SREM basics                                                            PASSED
Mass SADD and SINTER with two sets                                     PASSED
SINTERSTORE with two sets                                              PASSED
SINTER against three sets                                              PASSED
SINTERSTORE with three sets                                            PASSED
SAVE - make sure there are all the types as values                     - DB saved on disk
PASSED
Create a random list                                                   . DB 0: 6057 keys in 16384 slots HT.
. DB 1: 3 keys in 16 slots HT.
. 1 clients connected (0 slaves), 1045147 bytes in use
PASSED
SORT with BY against the newly created list                            PASSED
SORT direct, numeric, against the newly created list                   PASSED
SORT decreasing sort                                                   PASSED
SORT speed, sorting 10000 elements list using BY, 100 times
  Average time to sort: 5.28 milliseconds PASSED
SORT speed, sorting 10000 elements list directly, 100 times
  Average time to sort: 1.53 milliseconds PASSED
SORT speed, pseudo-sorting 10000 elements list, BY <const>, 100 times
  Average time to sort: 0.47 milliseconds PASSED
SORT regression for issue #19, sorting floats                          - DB saved on disk
PASSED
LREM, remove all the occurrences                                       - DB saved on disk
PASSED
LREM, remove the first occurrence                                      PASSED
LREM, remove non existing element                                      PASSED
LREM, starting from tail with negative count                           - DB saved on disk
PASSED
LREM, starting from tail with negative count (2)                       PASSED
MGET                                                                   - DB saved on disk
PASSED
MGET against non existing key                                          PASSED
MGET against non-string key                                            PASSED
FLUSHALL                                                               - DB saved on disk
PASSED

79 tests, 79 passed, 0 failed
. Client closed connection
. 0 clients connected (0 slaves), 1347660 bytes in use

$ kill -15 %1
[1]+  Terminated              ./redis-server redis.conf

$ vim redis.conf

$ tail -1 redis.conf
requirepass foobared

$ ./redis-server redis.conf &
[1] 52518
$ - Server started, Redis version 0.08
- DB loaded from disk
- The server is now ready to accept connections on port 6379
. 0 clients connected (0 slaves), 1945 bytes in use

$ make test
tclsh test-redis.tcl
. Accepted 127.0.0.1:54492
DEL all keys to start with a clean DB

ERR operation not permitted

    while executing
"::redis::redis_read_reply $fd"
    (procedure "::redis::__dispatch__" line 13)
    invoked from within
"$r keys *"
    ("uplevel" body line 2)
    invoked from within
"uplevel 1 $code"
    (procedure "test" line 4)
    invoked from within
"test {DEL all keys to start with a clean DB} {
        foreach key [$r keys *] {$r del $key}
        $r dbsize
    } {0}"
    (procedure "main" line 13)
    invoked from within
"main 127.0.0.1 6379"
    invoked from within
"if {[llength $argv] == 0} {
    main 127.0.0.1 6379
} elseif {[llength $argv] == 1 && [lindex $argv 0] eq {stress}} {
    stress
} else {
    main [li..."
    (file "test-redis.tcl" line 630)
. Client closed connection
make: *** [test] Error 1
. 0 clients connected (0 slaves), 2041 bytes in use
. 0 clients connected (0 slaves), 2041 bytes in use

$ kill -15 %1
[1]+  Terminated              ./redis-server redis.conf

$ vim test-redis.tcl

$ git diff test-redis.tcl
2009-03-25 23:03:56 -04:00
antirez
10c43610de Nasty bug of the new DB format fixed, objects sharing implemented 2009-03-25 21:00:48 +01:00
Luc Heinrich
ed329fcf25 Allow to specify the pid file from the config file. 2009-03-23 12:31:33 +01:00
antirez
ed9b544e10 first commit 2009-03-22 10:30:00 +01:00