- 02 May, 2013 1 commit
-
-
charsyam authored
There was a race condition in the AOF rewrite code that, with bad enough timing, could cause a volatile key just about to expire to be turned into a non-volatile key. The bug was never reported to cause actualy issues, but was found analytically by an user in the Redis mailing list: https://groups.google.com/forum/?fromgroups=#!topic/redis-db/Kvh2FAGK4Uk This commit fixes issue #1079.
-
- 24 Apr, 2013 2 commits
- 27 Feb, 2013 1 commit
-
-
antirez authored
This commit also fixes redisLog() statements producing warnings.
-
- 26 Feb, 2013 1 commit
-
-
antirez authored
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.
-
- 28 Jan, 2013 1 commit
-
-
antirez authored
decrRefCount used to get its argument as a void* pointer in order to be used as destructor where a 'void free_object(void*)' prototype is expected. However this made simpler to introduce bugs by freeing the wrong pointer. This commit fixes the argument type and introduces a new wrapper called decrRefCountVoid() that can be used when the void* argument is needed.
-
- 19 Jan, 2013 2 commits
-
-
antirez authored
This commit fixes issue #875 that was caused by the following events: 1) There is an active child doing BGSAVE. 2) flushall is called (or any other condition that makes Redis killing the saving child process). 3) An error is sensed by Redis as the child exited with an error (killed by a singal), that stops accepting write commands until a BGSAVE happens to be executed with success. Whitelisting SIGUSR1 and making sure Redis always uses this signal in order to kill its own children fixes the issue.
-
guiquanz authored
-
- 15 Jan, 2013 1 commit
-
-
antirez authored
Sometimes it is much simpler to debug complex Redis installations if it is possible to assign clients a name that is displayed in the CLIENT LIST output. This is the case, for example, for "leaked" connections. The ability to provide a name to the client makes it quite trivial to understand what is the part of the code implementing the client not releasing the resources appropriately. Behavior: CLIENT SETNAME: set a name for the client, or remove the current name if an empty name is set. CLIENT GETNAME: get the current name, or a nil. CLIENT LIST: now displays the client name if any. Thanks to Mark Gravell for pushing this idea forward.
-
- 19 Nov, 2012 1 commit
-
-
antirez authored
Finally Redis is able to report the amount of memory used by copy-on-write while saving an RDB or writing an AOF file in background. Note that this information is currently only logged (at NOTICE level) and not shown in INFO because this is less trivial (but surely doable with some minor form of interprocess communication). The reason we can't capture this information on the parent before we call wait3() is that the Linux kernel will release the child memory ASAP, and only retain the minimal state for the process that is useful to report the child termination to the parent. The COW size is obtained by summing all the Private_Dirty fields found in the "smap" file inside the proc filesystem for the process. All this is Linux specific and is not available on other systems.
-
- 08 Nov, 2012 1 commit
-
-
antirez authored
-
- 18 Jul, 2012 1 commit
-
-
Saj Goonatilleke authored
If Redis only manages to write out a partial buffer, the AOF file won't load back into Redis the next time it starts up. It is better to discard the short write than waste time running redis-check-aof.
-
- 17 Jul, 2012 1 commit
-
-
Saj Goonatilleke authored
Behaves like rdb_last_bgsave_status -- even down to reporting 'ok' when no rewrite has been done yet. (You might want to check that aof_last_rewrite_time_sec is not -1.)
-
- 25 May, 2012 1 commit
-
-
antirez authored
The 'persistence' section of INFO output now contains additional four fields related to RDB and AOF persistence: rdb_last_bgsave_time_sec Duration of latest BGSAVE in sec. rdb_current_bgsave_time_sec Duration of current BGSAVE in sec. aof_last_rewrite_time_sec Duration of latest AOF rewrite in sec. aof_current_rewrite_time_sec Duration of current AOF rewrite in sec. The 'current' fields are set to -1 if a BGSAVE / AOF rewrite is not in progress. The 'last' fileds are set to -1 if no previous BGSAVE / AOF rewrites were performed. Additionally a few fields in the persistence section were renamed for consistency: changes_since_last_save -> rdb_changes_since_last_save bgsave_in_progress -> rdb_bgsave_in_progress last_save_time -> rdb_last_save_time last_bgsave_status -> rdb_last_bgsave_status bgrewriteaof_in_progress -> aof_rewrite_in_progress bgrewriteaof_scheduled -> aof_rewrite_scheduled After the renaming, fields in the persistence section start with rdb_ or aof_ prefix depending on the persistence method they describe. The field 'loading' and related fields are not prefixed because they are unique for both the persistence methods.
-
- 24 May, 2012 1 commit
-
-
antirez authored
During the AOF rewrite process, the parent process needs to accumulate the new writes in an in-memory buffer: when the child will terminate the AOF rewriting process this buffer (that ist the difference between the dataset when the rewrite was started, and the current dataset) is flushed to the new AOF file. We used to implement this buffer using an sds.c string, but sds.c has a 2GB limit. Sometimes the dataset can be big enough, the amount of writes so high, and the rewrite process slow enough that we overflow the 2GB limit, causing a crash, documented on github by issue #504. In order to prevent this from happening, this commit introduces a new system to accumulate writes, implemented by a linked list of blocks of 10 MB each, so that we also avoid paying the reallocation cost. Note that theoretically modern operating systems may implement realloc() simply as a remaping of the old pages, thus with very good performances, see for instance the mremap() syscall on Linux. However this is not always true, and jemalloc by default avoids doing this because there are issues with the current implementation of mremap(). For this reason we are using a linked list of blocks instead of a single block that gets reallocated again and again. The changes in this commit lacks testing, that will be performed before merging into the unstable branch. This fix will not enter 2.4 because it is too invasive. However 2.4 will log a warning when the AOF rewrite buffer is near to the 2GB limit.
-
- 21 May, 2012 1 commit
-
-
antirez authored
This makes the code more readable, it is still not the case to split the file itself into three different files, but the logical separation improves the readability especially since new commits are going to introduce an additional section.
-
- 07 Apr, 2012 1 commit
-
-
antirez authored
-
- 27 Mar, 2012 1 commit
-
-
Premysl Hruby authored
-
- 25 Mar, 2012 1 commit
-
-
antirez authored
This new field counts all the times Redis is configured with AOF enabled and fsync policy 'everysec', but the previous fsync performed by the background thread was not able to complete within two seconds, forcing Redis to perform a write against the AOF file while the fsync is still in progress (likely a blocking operation).
-
- 14 Mar, 2012 1 commit
-
-
antirez authored
-
- 10 Mar, 2012 1 commit
-
-
antirez authored
Added a top-function comment to rioWriteHashIteratorCursor() to better specify what the function does. Not immediately clear from the name.
-
- 24 Jan, 2012 1 commit
-
-
antirez authored
-
- 23 Jan, 2012 1 commit
-
-
antirez authored
Implementation of the internals that make possible to terminate clients overcoming configured output buffer (soft and hard) limits.
-
- 17 Jan, 2012 1 commit
-
-
antirez authored
Track the length of the client pending output buffers (still to transfer) in a new field in the client structure.
-
- 03 Jan, 2012 1 commit
-
-
Pieter Noordhuis authored
-
- 21 Dec, 2011 6 commits
- 20 Dec, 2011 1 commit
-
-
antirez authored
-
- 15 Dec, 2011 2 commits
- 13 Dec, 2011 5 commits
- 12 Nov, 2011 1 commit
-
-
antirez authored
Fixed issues with expire introduced with latest millisecond resolution feature. Many time_t were not converted to long long, and one time() call was not replaced with mstime().
-