Commit Graph

6408 Commits

Author SHA1 Message Date
antirez
a047bf52a4 fixed a few harmless warnings complining on Linux 2010-09-01 18:31:30 +02:00
antirez
dbebd395eb Version is now 2.1.4 -- AKA 2.2-alpha1 2010-08-31 18:34:34 +02:00
antirez
ec96ef47a6 Merge remote branch 'pietern/issue-300' 2010-08-31 17:39:06 +02:00
Pieter Noordhuis
f85202c3dc Fix compilation errors and add warning for 32-bit platforms 2010-08-31 13:06:26 +02:00
antirez
f7f12a606c resolved conflict merging pietern/bpop-timeout 2010-08-31 11:23:12 +02:00
Pieter Noordhuis
7b30cc3a7b Fix issue 300 by upgrading variable types to 64-bit 2010-08-31 10:21:35 +02:00
Pieter Noordhuis
57b0738011 Don't build a reply when replaying the AOF 2010-08-30 16:51:39 +02:00
Pieter Noordhuis
b301c1fc2b Wrapper for adding unknown multi bulk length to reply list 2010-08-30 16:39:14 +02:00
Pieter Noordhuis
834ef78e27 Refactor reply buildup for speed on large multi bulk replies 2010-08-30 16:39:08 +02:00
antirez
fb92ecece7 BLPOP inside MULTI/EXEC block no longer crashes, instead if the list is empty the behavior is like if the timeout is reached. This fixes Issue 285 2010-08-30 16:31:03 +02:00
antirez
8079656a8e Now redis-cli replies to help showing some basic usage information (Issue 291) 2010-08-30 15:57:03 +02:00
antirez
93b2a7718e It is now possible to use authentication and DB selection options at the same time in redis-cli (Issue 298) 2010-08-30 15:36:13 +02:00
antirez
e0e1c19520 Fixed MONITOR mode and Issue 296 2010-08-30 11:51:45 +02:00
antirez
8fedd04dcc Makefile deps updated 2010-08-30 11:37:17 +02:00
Pieter Noordhuis
ed0dd55402 Show the current throughput while benchmarking 2010-08-30 11:25:02 +02:00
Pieter Noordhuis
36babc1e31 Refactor reply parsing code in redis-benchmark for efficiency 2010-08-30 11:14:54 +02:00
antirez
2f6b31c3bb Fix for a race in BGSAVE that may result in some data not being saved as soon as possible (when the configured saving triggers should fire). Also known as Issue 313, more details there in the google code issue. 2010-08-30 10:32:32 +02:00
antirez
e5f257c2b2 fix for the prev fix 2010-08-27 17:06:36 +02:00
antirez
c1ae36aea8 Fix for bug 312, yet to verify in a couple of minutes... 2010-08-27 17:04:26 +02:00
antirez
09252fc4f3 Fixed another instace of the Issue 173 2010-08-27 12:46:10 +02:00
antirez
357d36733d Fixed segfault in freeMemoryIfNeeded due to the fact that keys are now sds strings and not objects in the main hash table, thanks to Anthony Lauzon for spotting the bug and providing a patch. 2010-08-27 11:01:03 +02:00
antirez
2df84b7269 intset loading bug fixed 2010-08-26 19:10:40 +02:00
antirez
ec7e138926 test for intset integer encodability test and some small refactoring 2010-08-26 18:47:03 +02:00
antirez
23c64fe50d translated a few long logn into int64_t for correctness and to avoid compilation warnings as well 2010-08-26 18:11:26 +02:00
antirez
e4ecc93119 Version is now 2.1.3 2010-08-26 16:58:02 +02:00
Pieter Noordhuis
94364d53b4 Verify that the blocking pop timeout value is a non-negative integer 2010-08-26 14:05:14 +02:00
Pieter Noordhuis
2929ca9786 Fix parenthesis error on decrementing *argc 2010-08-26 13:18:44 +02:00
antirez
bad7d097e9 fixed a memory leak in the new Set code 2010-08-26 13:18:24 +02:00
antirez
5f19e8a4a5 computeObjectSwappability is now able to compute swappability for intset encoded sets 2010-08-26 12:28:53 +02:00
Pieter Noordhuis
740eee1cc6 Fix type that was not renamed and compiler warning 2010-08-26 12:13:51 +02:00
antirez
674492bceb removed a duplicated ERRNO checking that is useless at all 2010-08-26 12:10:16 +02:00
antirez
acc75bfd4f Merge remote branch 'pietern/intset-split' 2010-08-26 12:04:24 +02:00
Pieter Noordhuis
f9d5c4e33c Make the function intsetUpgrade self-contained 2010-08-26 11:22:58 +02:00
Pieter Noordhuis
76864d5626 Expand macro's to functions for readability 2010-08-26 11:06:30 +02:00
Pieter Noordhuis
b4b62c34db Use fstat to detect if stdin was redirected 2010-08-25 14:48:50 +02:00
Pieter Noordhuis
ae77016e57 Add a newline to tty output after every reply 2010-08-25 13:39:11 +02:00
Pieter Noordhuis
5d15b5207d Re-introduce the interactive field so we can reconnect in interactive mode 2010-08-25 13:09:22 +02:00
Pieter Noordhuis
4b93e5e267 Merge master and move argument splitting patch to sds.c 2010-08-25 13:08:43 +02:00
antirez
c0b3d42372 redis-cli now supports automatically reconnection in interactive mode 2010-08-24 18:39:34 +02:00
antirez
b37ca6edb1 Issue 179 fixed, now redis-cli is able to parse correctly multi bulk replies with elements that are errors 2010-08-24 18:08:09 +02:00
antirez
695fe87456 The pid file is now created only after the server is correctly initialied. It is also removed on sigterm and when the stack trace is produced after a sigbus or a sigsegv. This two changes should fix the Issue 175 2010-08-24 17:09:25 +02:00
antirez
b91d605a35 slave now detect lost connection during SYNC, fixing Issue 173 2010-08-24 16:25:00 +02:00
antirez
778b2210a9 slave with attached slaves now close the conection to all the slaves when the connection to the master is lost. Now a slave without a connected link to the master will refuse SYNC from other slaves. Enhanced the replication error reporting. All this will fix Issue 156 2010-08-24 16:04:13 +02:00
antirez
e452436a07 BLPOPping clients are no longer subject to connection timeouts, fixing issues 155 2010-08-24 12:10:59 +02:00
antirez
a679185aa5 sanity check for the bulk argument in protocol parsing code, fixing issue 146 2010-08-24 11:45:05 +02:00
antirez
c91abdcd07 Fixed overflow detection in argument to long convertion function in general, and in expire/ttl pairs specifically, addressing issue 54 2010-08-23 17:06:38 +02:00
Pieter Noordhuis
cb72d0f155 Rename iterator to setTypeIterator for consistency 2010-08-21 11:38:24 +02:00
Pieter Noordhuis
029e5577ff Make SORT use the hybrid set accessors to allow sorting intsets 2010-08-21 11:20:41 +02:00
Pieter Noordhuis
87c74dfaa8 Check if stroll return value was clamped 2010-08-20 13:42:42 +02:00
Pieter Noordhuis
aaada3f962 Merge branch 'master' into intset-split
Conflicts:
	src/Makefile
	src/t_set.c
2010-08-20 12:40:55 +02:00
Pieter Noordhuis
c470538142 Make ziplist schema more efficient for strings with length > 15 2010-08-13 19:29:22 +02:00
antirez
cbce517145 redis cli argument splitting is general and is now moved into the sds.c lib 2010-08-05 11:36:39 +02:00
Pieter Noordhuis
abb731e5b8 Deprecate starting interactive mode using the -i flag 2010-08-04 18:36:03 +02:00
Pieter Noordhuis
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
Pieter Noordhuis
3a51bff035 Change output format for non-tty redis-cli execution 2010-08-04 17:46:56 +02:00
Pieter Noordhuis
123a10f7a5 Let the output mode depend on having a tty or not 2010-08-04 17:16:05 +02:00
Pieter Noordhuis
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
Pieter Noordhuis
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
Pieter Noordhuis
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
Pieter Noordhuis
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
Pieter Noordhuis
2159782b51 Use flexible array in zskiplistNode to reduce memory usage 2010-08-03 19:22:09 +02:00
antirez
1fb4e8def7 PERSIST: a fix and some basic test 2010-08-03 14:25:22 +02:00
antirez
a539d29ac5 PERSIST command implemented 2010-08-03 14:19:20 +02:00
Pieter Noordhuis
a5639e7dd9 Change initialization to allow listening on both a port and socket 2010-08-03 13:33:12 +02:00
antirez
0cf5b7b57c allow to set a new EXPIRE of an existing volatile key 2010-08-03 12:26:30 +02:00
antirez
c25a5d3b10 memory leak removed from expire propagation code 2010-08-02 21:37:39 +02:00
antirez
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
Pieter Noordhuis
7e91f971f7 Add support for domain sockets to redis-cli 2010-08-01 23:06:00 +02:00
Pieter Noordhuis
c61e69257a Support for Redis to listen on a Unix socket 2010-08-01 22:55:24 +02:00
Pieter Noordhuis
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
Pieter Noordhuis
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
antirez
cbf7e1070a fix of the fix for the replication bug 2010-07-28 18:56:52 +02:00
antirez
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
antirez
6171250871 fixed a ziplist bug about encoding of integer values overflowing 64 bit 2010-07-27 15:26:08 +02:00
antirez
f99e660b44 malloc definition with deprecated attribute was duplicated, one removed 2010-07-27 14:30:02 +02:00
antirez
80091bbaac STRLEN command implemented 2010-07-27 10:09:26 +02:00
antirez
e0be2289e9 hash table example commented out in dict.c 2010-07-27 10:00:38 +02:00
antirez
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
Benjamin Kramer
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
Benjamin Kramer
d9dd352b36 Remove _dictAlloc and friends
zmalloc calls abort() so _dictPanic will never be called.
2010-07-24 23:10:42 +02:00
Benjamin Kramer
b1e0bd4b9b Reduce code duplication 2010-07-24 22:37:01 +02:00
antirez
230729617d don't open/close log file if log level is not matched 2010-07-22 23:31:40 +02:00
Pieter Noordhuis
c8a10631d1 fix rare condition where 'key' would already be destroyed while is was needed later on 2010-07-22 16:06:27 +02:00
antirez
2f996f0217 defensive programming: set o->ptr to NULL before freeing objects 2010-07-22 15:48:57 +02:00
antirez
e002ec6801 other shared objects where created in the I/O thread in createStringObjectFromLongLong. Fixed as well. 2010-07-22 14:48:45 +02:00
antirez
cdbea20afb minor typo fixed in a comment 2010-07-22 13:12:24 +02:00
antirez
0e5441d816 don't use object sharing inside I/O threads, as a fix for a well known instability of VM introduced with the new object sharing code 2010-07-22 13:08:02 +02:00
antirez
1a71fb9669 vm_blocked_clients count fixed in INFO, thanks to Pietern Noordhuis 2010-07-21 13:16:26 +02:00
antirez
2cffe2993b TODO list modified, trivial change to source code 2010-07-16 23:56:18 +02:00
antirez
5b4bff9c17 WATCH is now affected only when write commands actually modify the key content 2010-07-12 12:01:15 +02:00
antirez
e51a74aa40 fmacro included in linenoise.c 2010-07-09 10:51:41 +02:00
antirez
99628c1af8 redis-cli history saved across sessions 2010-07-07 18:44:53 +02:00
antirez
185cabda45 redis-cli is now able to report version information using -v 2010-07-06 19:17:09 +02:00
antirez
acc0185493 make install target, finally ;) 2010-07-06 19:07:16 +02:00
Pieter Noordhuis
d0a4e24e32 merged code from 184d74ab, 4774a53b, f483ce5f to new file structure 2010-07-05 15:16:33 -04:00
antirez
d06a5b23c8 Fixed compilation on *BSD systems 2010-07-05 20:14:48 +02:00
antirez
b67d234563 Fixed a crash loading the AOF file containing MULTI/EXEC, a result of WATCH implementation. Test needed... 2010-07-05 20:06:54 +02:00
antirez
b7a8daef60 WATCH will now consider touched keys target of EXPIRE command after the WATCH is performed, but not before 2010-07-05 19:38:12 +02:00
Pieter Noordhuis
2767f1c0c6 fix aof and digest code to work with dual set encoding 2010-07-02 20:42:20 +02:00
Pieter Noordhuis
96ffb2fe97 merged intset code into the split files 2010-07-02 19:57:12 +02:00
antirez
3688d7f308 Compilation fixed on Linux after the source code split 2010-07-01 21:13:38 +02:00
antirez
d3b958c3fc Fixed MONITOR output for consistency: now integer encoded values are also formatted like this: "3932" 2010-07-01 20:22:46 +02:00
antirez
5bd09cd4c5 Fix the AOF fix of the latest commit ;) 2010-07-01 20:18:48 +02:00
antirez
daf2049d0d fixed error code checking for *write operations and return value in AOF rewriting function 2010-07-01 20:13:33 +02:00
antirez
0f49d6b049 minor aesthetic change 2010-07-01 15:14:25 +02:00
antirez
2c24c22039 Version is now 2.1.2 2010-07-01 14:47:26 +02:00
antirez
24110a4d7d Make log target fixed 2010-07-01 14:45:37 +02:00
antirez
e2641e09cc redis.c split into many different C files.
networking related stuff moved into networking.c

moved more code

more work on layout of source code

SDS instantaneuos memory saving. By Pieter and Salvatore at VMware ;)

cleanly compiling again after the first split, now splitting it in more C files

moving more things around... work in progress

split replication code

splitting more

Sets split

Hash split

replication split

even more splitting

more splitting

minor change
2010-07-01 14:38:51 +02:00