Commit Graph

3126 Commits

Author SHA1 Message Date
ced6709cb9 Make SORT tests use both ziplists and linked lists as input 2010-08-21 11:02:22 +02:00
5d4f3a8c85 Move SORT tests around 2010-08-21 10:55:53 +02:00
a53ebb4c8e Don't abort test suite when the server block has a return value 2010-08-21 10:54:31 +02:00
87c74dfaa8 Check if stroll return value was clamped 2010-08-20 13:42:42 +02:00
aaada3f962 Merge branch 'master' into intset-split
Conflicts:
	src/Makefile
	src/t_set.c
2010-08-20 12:40:55 +02:00
c470538142 Make ziplist schema more efficient for strings with length > 15 2010-08-13 19:29:22 +02:00
cbce517145 redis cli argument splitting is general and is now moved into the sds.c lib 2010-08-05 11:36:39 +02:00
abb731e5b8 Deprecate starting interactive mode using the -i flag 2010-08-04 18:36:03 +02:00
cf0c6b78f1 Set tty before going into interactive mode to get non-pretty output when
the commands are read from stdin.
2010-08-04 18:16:39 +02:00
3a51bff035 Change output format for non-tty redis-cli execution 2010-08-04 17:46:56 +02:00
123a10f7a5 Let the output mode depend on having a tty or not 2010-08-04 17:16:05 +02:00
07242c0ccf Tests for redis-cli in non-interactive mode
Minor change in redis-cli output for the (multi-)bulk response but this
will be fixed in the next commit.
2010-08-04 17:02:13 +02:00
0439d792c4 Add tests for quotation in an interactive redis-cli session
Patched redis-cli to abort on unexpected quotation. This caused
redis-cli to get into an infinite, memory-consuming loop.
2010-08-04 16:15:33 +02:00
f2dd4769dd Tests for the interactive mode of redis-cli
Changed redis-cli to output the raw response for a bulk reply when it is
run in interactive mode instead of checking isatty.
2010-08-04 15:28:03 +02:00
69ef89f2cf Reference zset score in zskiplistNode from dict entries
This avoids the extra allocation of sizeof(double) for storing the score
of a zset entry in the hash table. Saves sizeof(double) + malloc
overhead = approx. 16 bytes per zset entry.
2010-08-03 20:49:53 +02:00
2159782b51 Use flexible array in zskiplistNode to reduce memory usage 2010-08-03 19:22:09 +02:00
1fb4e8def7 PERSIST: a fix and some basic test 2010-08-03 14:25:22 +02:00
a539d29ac5 PERSIST command implemented 2010-08-03 14:19:20 +02:00
6146329f1f replication test with expires 2010-08-03 13:38:39 +02:00
a5639e7dd9 Change initialization to allow listening on both a port and socket 2010-08-03 13:33:12 +02:00
23d7298b15 Merge remote branch 'pietern/test-encoding-fix' into writeonexpire 2010-08-03 13:09:27 +02:00
2c572622fb no longer passing tests due to the new write-on-volatile semantics modified/removed 2010-08-03 13:08:32 +02:00
0cf5b7b57c allow to set a new EXPIRE of an existing volatile key 2010-08-03 12:26:30 +02:00
c25a5d3b10 memory leak removed from expire propagation code 2010-08-02 21:37:39 +02:00
bcf2995c98 support for write operations against expiring keys, by master-controlled expiring in replication and AOF synthesizing DEL operations 2010-08-02 18:13:39 +02:00
7e91f971f7 Add support for domain sockets to redis-cli 2010-08-01 23:06:00 +02:00
c61e69257a Support for Redis to listen on a Unix socket 2010-08-01 22:55:24 +02:00
6825491928 Fix assertion function on value encoding 2010-08-01 11:20:26 +02:00
0c7a9dec65 Merge remote branch 'pietern/list-test' 2.2-alpha0 2010-07-31 13:55:06 +02:00
673e1fb7e4 Change getDoubleFromObject to fail on NaN.
Return an error when the resulting value is not a number (NaN). Fix
ZUNIONSTORE/ZINTERSTORE to clean up when a weight argument is not a
double value.
2010-07-29 23:05:01 +02:00
d9e28bcf00 Fix ZUNIONSTORE/ZINTERSTORE to never store a NaN score.
When +inf and -inf are added, the result is NaN. We don't want NaN
scores in a sorted set, so agreed on the result of this operation being
zero.
2010-07-29 23:03:11 +02:00
715c801a07 Use a large value to consistently trigger a list encoding,
even when the list is swapped out and in again.
2010-07-29 13:56:35 +02:00
86d392498b ensure the value is swapped in before testing its encoding 2010-07-29 13:31:24 +02:00
cbf7e1070a fix of the fix for the replication bug 2010-07-28 18:56:52 +02:00
8c1420ff2a Fixed a replication bug in ZINTERSTORE.
In order to trigger the bug what's needed is to call ZINTERSTORE
resulting into an empty set created, bug against a key that already
existed. The command was not propagated, so the replica ended with the
key that the master removed. Sequence of command to reproduce:

redis-cli hset 446 34 905
redis-cli hset 446 393 911
redis-cli zadd 966 0.085412045980529885 652
redis-cli zadd 645 0.25081839284432045 280
redis-cli zinterstore 446 2 966 645
2010-07-28 18:42:02 +02:00
a0573260b0 better random dataset creation function in test. master-slave replication test now is able to save the two datasets in CSV when an inconsistency is detected. 2010-07-28 14:08:46 +02:00
6171250871 fixed a ziplist bug about encoding of integer values overflowing 64 bit 2010-07-27 15:26:08 +02:00
db0c43a70c removed test code having bad effects... 2010-07-27 14:46:39 +02:00
dd3f505ff5 Consistency test improved 2010-07-27 14:42:11 +02:00
f99e660b44 malloc definition with deprecated attribute was duplicated, one removed 2010-07-27 14:30:02 +02:00
80091bbaac STRLEN command implemented 2010-07-27 10:09:26 +02:00
e0be2289e9 hash table example commented out in dict.c 2010-07-27 10:00:38 +02:00
b3aa6d712e use the function deprecated attribute if compiling with GCC to get warnings for malloc/free usages. We always want to use our zmalloc/zfree versions for memory usage tracking 2010-07-27 09:36:42 +02:00
399f2f401c Add zcalloc and use it where appropriate
calloc is more effecient than malloc+memset when the system uses mmap to
allocate memory. mmap always returns zeroed memory so the memset can be
avoided.  The threshold to use mmap is 16k in osx libc and 128k in bsd
libc and glibc. The kernel can lazily allocate the pages, this reduces
memory usage when we have a page table or hash table that is mostly
empty.

This change is most visible when you start a new redis instance with vm
enabled.  You'll see no increased memory usage no matter how big your
page table is.
2010-07-25 00:11:20 +02:00
d9dd352b36 Remove _dictAlloc and friends
zmalloc calls abort() so _dictPanic will never be called.
2010-07-24 23:10:42 +02:00
b1e0bd4b9b Reduce code duplication 2010-07-24 22:37:01 +02:00
e39c8b5047 exit with non-zero status when there are failed tests 2010-07-23 13:08:35 +02:00
230729617d don't open/close log file if log level is not matched 2010-07-22 23:31:40 +02:00
c8a10631d1 fix rare condition where 'key' would already be destroyed while is was needed later on 2010-07-22 16:06:27 +02:00
2f996f0217 defensive programming: set o->ptr to NULL before freeing objects 2010-07-22 15:48:57 +02:00