Commits on Nov 23, 2012
  1. @antirez

    Merge pull request #787 from charsyam/remove-warning-bio

    remove compile warning bioKillThreads
    antirez committed Nov 23, 2012
Commits on Nov 22, 2012
  1. @openbaas
  2. @antirez

    EVALSHA is now case insensitive.

    EVALSHA used to crash if the SHA1 was not lowercase (Issue #783).
    Fixed using a case insensitive dictionary type for the sha -> script
    map used for replication of scripts.
    antirez committed Nov 22, 2012
  3. @antirez

    Fix integer overflow in zunionInterGenericCommand().

    This fixes issue #761.
    antirez committed Nov 22, 2012
  4. @antirez
  5. @antirez
  6. @antirez
  7. @antirez

    Safer handling of MULTI/EXEC on errors.

    After the transcation starts with a MULIT, the previous behavior was to
    return an error on problems such as maxmemory limit reached. But still
    to execute the transaction with the subset of queued commands on EXEC.
    
    While it is true that the client was able to check for errors
    distinguish QUEUED by an error reply, MULTI/EXEC in most client
    implementations uses pipelining for speed, so all the commands and EXEC
    are sent without caring about replies.
    
    With this change:
    
    1) EXEC fails if at least one command was not queued because of an
    error. The EXECABORT error is used.
    2) A generic error is always reported on EXEC.
    3) The client DISCARDs the MULTI state after a failed EXEC, otherwise
    pipelining multiple transactions would be basically impossible:
    After a failed EXEC the next transaction would be simply queued as
    the tail of the previous transaction.
    antirez committed Nov 15, 2012
  8. @antirez

    Make bio.c threads killable ASAP if needed.

    We use this new bio.c feature in order to stop our I/O threads if there
    is a memory test to do on crash. In this case we don't want anything
    else than the main thread to run, otherwise the other threads may mess
    with the heap and the memory test will report a false positive.
    antirez committed Nov 22, 2012
Commits on Nov 21, 2012
  1. @antirez

    Fast memory test on Redis crash.

    antirez committed Nov 21, 2012
  2. @antirez
Commits on Nov 19, 2012
  1. @antirez

    Children creating AOF or RDB files now report memory used by COW.

    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.
    antirez committed Nov 19, 2012
  2. @antirez

    zmalloc_get_private_dirty() function added (Linux only).

    For non Linux systmes it just returns 0.
    
    This function is useful to estimate copy-on-write because of childs
    saving stuff on disk.
    antirez committed Nov 19, 2012
Commits on Nov 14, 2012
  1. @antirez
  2. @antirez
  3. @antirez

    Test: more MIGRATE tests.

    antirez committed Nov 14, 2012
  4. @antirez

    MIGRATE: retry one time on I/O error.

    Now that we cache connections, a retry attempt makes sure that the
    operation don't fail just because there is an existing connection error
    on the socket, like the other end closing the connection.
    
    Unfortunately this condition is not detectable using
    getsockopt(SO_ERROR), so the only option left is to retry.
    
    We don't retry on timeouts.
    antirez committed Nov 14, 2012
  5. @antirez
Commits on Nov 12, 2012
  1. @antirez

    TTL API change: TTL returns -2 for non existing keys.

    The previous behavior was to return -1 if:
    
    1) Existing key but without an expire set.
    2) Non existing key.
    
    Now the second case is handled in a different, and TTL will return -2
    if the key does not exist at all.
    
    PTTL follows the same behavior as well.
    antirez committed Nov 12, 2012
  2. @antirez

    MIGRATE: fix default timeout to 1000 milliseconds.

    When a timeout <= 0 is provided we set a default timeout of 1 second.
    It was set to 1 millisecond for an error resulting from a recent change.
    antirez committed Nov 12, 2012
  3. @antirez
  4. @antirez

    MIGRATE timeout should be in milliseconds.

    While it is documented that the MIGRATE timeout is in milliseconds, it
    was in seconds instead. This commit fixes the problem.
    antirez committed Nov 12, 2012
Commits on Nov 11, 2012
  1. @antirez

    MIGRATE TCP connections caching.

    By caching TCP connections used by MIGRATE to chat with other Redis
    instances a 5x performance improvement was measured with
    redis-benchmark against small keys.
    
    This can dramatically speedup cluster resharding and other processes
    where an high load of MIGRATE commands are used.
    antirez committed Nov 12, 2012
Commits on Nov 8, 2012
  1. @antirez
  2. @antirez

    Make clear that contributing code to the Redis project means to relea…

    …se it under the terms of the BSD license.
    antirez committed Nov 8, 2012
  3. @antirez
Commits on Nov 7, 2012
  1. @antirez

    COPY and REPLACE options for MIGRATE.

    With COPY now MIGRATE does not remove the key from the source instance.
    With REPLACE it uses RESTORE REPLACE on the target host so that even if
    the key already eixsts in the target instance it will be overwritten.
    
    The options can be used together.
    antirez committed Nov 7, 2012
  2. @antirez

    REPLACE option for RESTORE.

    The REPLACE option deletes an existing key with the same name (if any)
    and materializes the new one. The default behavior without RESTORE is to
    return an error if a key already exists.
    antirez committed Nov 7, 2012
Commits on Nov 6, 2012
  1. @antirez

    Type mismatch errors are now prefixed with WRONGTYPE.

    So instead to reply with a generic error like:
    
    -ERR ... wrong kind of value ...
    
    now it replies with:
    
    -WRONGTYPE ... wrong kind of value ...
    
    This makes this particular error easy to check without resorting to
    (fragile) pattern matching of the error string (however the error string
    used to be consistent already).
    
    Client libraries should return a specific exeption type for this error.
    
    Most of the commit is about fixing unit tests.
    antirez committed Nov 6, 2012
Commits on Nov 2, 2012
  1. @antirez

    Merge pull request #741 from Run/typo

    fix a typo in redis.h line 595 comment
    antirez committed Nov 2, 2012
Commits on Nov 1, 2012
  1. @antirez

    More robust handling of AOF rewrite child.

    After the wait3() syscall we used to do something like that:
    
        if (pid == server.rdb_child_pid) {
            backgroundSaveDoneHandler(exitcode,bysignal);
        } else {
            ....
        }
    
    So the AOF rewrite was handled in the else branch without actually
    checking if the pid really matches. This commit makes the check explicit
    and logs at WARNING level if the pid returned by wait3() does not match
    neither the RDB or AOF rewrite child.
    antirez committed Nov 1, 2012
  2. @cofyc @antirez
  3. @antirez

    Unix socket clients properly displayed in MONITOR and CLIENT LIST.

    This also fixes issue #745.
    antirez committed Nov 1, 2012
  4. @antirez

    32 bit build fixed on Linux.

    It failed because of the way jemalloc was compiled (without passing the
    right flags to make, but just to configure). Now the same set of flags
    are also passed to the make command, fixing the issue.
    
    This fixes issue #744
    antirez committed Nov 1, 2012
Commits on Oct 31, 2012
  1. @run