Skip to content
Commits on Apr 2, 2012
  1. @Bergstein

    Correct debian package filename.

    Bergstein committed Apr 2, 2012
    Unified php5/conf.d support.
Commits on Mar 15, 2012
  1. @nicolasff

    Fix issue with interned igbinary strings.

    nicolasff committed Mar 15, 2012
    Possibly related to ticket #145.
Commits on Mar 12, 2012
  1. @nicolasff

    Add missing checks for sessions in igbinary.c

    nicolasff committed Mar 12, 2012
    Tentative fix for #137.
  2. @nicolasff

    More fixes for PHP 5.4

    nicolasff committed Mar 12, 2012
Commits on Mar 11, 2012
  1. @nicolasff

    Add conditional on include of php_session.h

    nicolasff committed Mar 11, 2012
    Fix for GitHub issue #137.
  2. @nicolasff

    Fix compilation issue with PHP 5.4

    nicolasff committed Mar 11, 2012
    zend_list_insert now takes an extra TSRMLS_CC.
    Resolves GitHub issue #144.
  3. @nicolasff

    Make sure stream exists when checking for EOF.

    nicolasff committed Mar 11, 2012
    Addressing issue #143.
Commits on Mar 6, 2012
  1. @nicolasff

    Merge pull request #141 from rjack/patch-1

    nicolasff committed Mar 6, 2012
    README: fix rPop
  2. README: fix rPop

    Giacomo Ritucci committed Mar 6, 2012
Commits on Feb 27, 2012
  1. Fix for issue #134 (missing port for sessions).

    Nicolas Favre-Felix committed Feb 27, 2012
    The port is set to 6379 if not specified.
Commits on Jan 30, 2012
  1. @nicolasff

    Fixed compilation issues with Clang.

    nicolasff committed Jan 30, 2012
    (GitHub issue #116).
  2. @nicolasff

    Fixed small leak with info().

    nicolasff committed Jan 30, 2012
    Thanks to @kotas for reporting and @chobie for fixing.
    This closes GitHub issue #125.
  3. @nicolasff

    Added mGet as an alias to GetMultiple in doc.

    nicolasff committed Jan 30, 2012
    Fixes GitHub issue #123.
  4. @nicolasff

    Fixed missing parameter in ZTS maintainer mode.

    nicolasff committed Jan 30, 2012
    Fixes GitHub issue #128 (Thanks @sztanpet!)
Commits on Jan 2, 2012
  1. @nicolasff

    Merge branch 'imvu-master'

    nicolasff committed Jan 2, 2012
  2. @nicolasff

    Fixed typo

    nicolasff committed Jan 2, 2012
  3. @nicolasff
Commits on Dec 30, 2011
  1. @nicolasff

    Fixed issue with HDEL in serialize mode.

    nicolasff committed Dec 30, 2011
    Addresses GitHub issue #114. Fixed unit test as well.
Commits on Dec 29, 2011
  1. @nicolasff

    Make Redis Array tests work on 32-bit.

    nicolasff committed Dec 29, 2011
    The custom key distribution function was returning negative
    ring offsets. This fix makes sure we always return positive or zero.
  2. @nicolasff

    Merge branch 'edlerd-master'

    nicolasff committed Dec 29, 2011
  3. @nicolasff
  4. @nicolasff

    Small changes to CONFIG contribution.

    nicolasff committed Dec 29, 2011
    Code cleanup, removed serialize and key prefix, added extra checks.
    Now returning an associative array on GET, bool on SET.
  5. @nicolasff
  6. @nicolasff
  7. add config function

    David Edler committed Dec 29, 2011
Commits on Dec 26, 2011
  1. @nicolasff

    Fixed weight type issue in ZUNION.

    nicolasff committed Dec 26, 2011
    (Fixes GitHub issue #109).
Commits on Dec 25, 2011
  1. @mobli

    Performance improvements for expire on rehash

    mobli committed Dec 25, 2011
    Improves the performance of rehashing either with auto-rehash or with
    the _rehash method by pipelining the call to TYPE and TTL and using
    SETEX instead of SET and EXPIRE for string keys.
Commits on Dec 22, 2011
  1. @ehohenstein-imvu

    fixing issue with re-connect logic

    ehohenstein-imvu committed Dec 22, 2011
    There was an issue with the re-connect logic such that it would sometimes only partially apply a transaction. The redis_check_eof() function in library.c was automatically and invisibly re-connecting to the redis server when php_stream_eof() returned non-zero. If this happened to happen after a transaction had been partially stored, the server was rolling back the transaction but the phpredis library was continuing as if it was still applying the transaction so the remaining commands were being applied immediately. The result was that the portion of the transaction after the re-connect was applied (although not atomically) but the portion before the reconnect was thrown away by the server.
    
    This change causes the phpredis library to fail (by throwing a RedisException) instead of reconnecting if the client session is in multi mode or it is watching any keys. Either of these conditions indicate that the server has lost the state of the session and the client needs to rebuild it. Because transactions can fail due to watched keys having been changed, clients that use transactions should already be coded to handle transaction failures using retry logic. With this change, clients that use transactions when talking to redis servers that use connection timeout, they will have to add a try...catch within the transaction retry loop to handle this type of failure. Clients that do not use transactions and clients that use transactions with redis servers that do not use connection timeout will be unaffected.
    
    Perhaps not coincidentally, this change also fixes a well known but previously not well understood bug that causes RedisExceptions to be thrown with a message like  "protocol error, got '*' as reply type byte". My company began integrating redis into our service that handles 500,000 daily active users in April of this year. Prior to this fix, when we had our redis server connection timeout set to 5 seconds we would get hundreds of those error messages showing up in our php error logs per day. This wasn't a huge problem but it was concerning enough to raise the connection timeout to 30 seconds which reduced the rate of the errors but didn't eliminate them. At one point we had a process that was failing repeatedly with this error with a 30 second timeout so we had to raise the timeout all the way up to 300 seconds. A long timeout is not idea for a high throughput website like ours since it can cause failures to cascade from one system to another due to resource limits and requests holding on to connections for a long time. After introducing this fix roughly a month ago we have not had a single instance of RedisException show up in our php error logs (except for legitimate errors related to the server being down) even after lowering the server timeout back down to 5 seconds.
    
    To reproduce the problem without this fix, set the redis server timeout configuration to 3 seconds and use the following test php script:
    
    <?php
    
    define('MAX_FAILURES', 1);
    
    function get_redis() {
        $r = new Redis();
        $r->connect('localhost');
        return $r;
    }
    
    $r = get_redis();
    
    $r->set('foo', '123');
    $r->set('bar', 'abc');
    
    if (isset($_GET['trans']) && $_GET['trans']) {
        $completed = false;
        $failures = 0;
        while (!$completed && ($failures < MAX_FAILURES)) {
            try {
                $trans = $r->multi();
                $trans->set('foo', $_GET['foo']);
                if (isset($_GET['sleep']) && $_GET['sleep']) {
                    sleep($_GET['sleep']);
                }
                $trans->set('bar', $_GET['bar']);
                var_export($trans->exec());
                echo '<br/>';
                $completed = true;
            } catch (RedisException $e) {
                echo 'transaction failed<br/>';
                $failures++;
                $r = get_redis();
            }
        }
    } else {
        $r->set('foo', $_GET['foo']);
        if (isset($_GET['sleep']) && $_GET['sleep']) {
            sleep($_GET['sleep']);
        }
        $r->set('bar', $_GET['bar']);
    }
    
    echo $r->get('foo');
    echo '<br/>';
    echo $r->get('bar');
    
    ?>
    
    ****************************
    *** Results without this fix
    ****************************
    
    foo=bar&bar=baz&trans=0&sleep=0
    bar
    baz
    
    foo=bar&bar=baz&trans=1&sleep=0
    array ( 0 => true, 1 => true, )
    bar
    baz
    
    foo=bar&bar=baz&trans=0&sleep=30
    bar
    baz
    
    foo=bar&bar=baz&trans=1&sleep=30
    NULL
    123
    baz
    
    Notice in this last example the call to exec() did not return anything and the value of the key 'bar' was modified by the transaction but the value of the key 'foo' was not even though the calls to set() on both keys were made between a call to multi() and a call to exec().
    
    *************************
    *** Results with this fix
    *************************
    
    foo=bar&bar=baz&trans=0&sleep=0
    bar
    baz
    
    foo=bar&bar=baz&trans=1&sleep=0
    array ( 0 => true, 1 => true, )
    bar
    baz
    
    foo=bar&bar=baz&trans=0&sleep=30
    bar
    baz
    
    foo=bar&bar=baz&trans=1&sleep=30
    transaction failed
    123
    abc
    
    Notice in the last example where the transaction failed message is printed, it is necessary to explicitly reconnect to the redis server. Trying to reuse the same redis object after it has failed to reconnect will result in a segmentation fault. I believe this was an existing problem with the phpredis library and it is not addressed by this change.
  2. @mobli

    Added key expiry on rehash

    mobli committed Dec 22, 2011
    Added a call to expire when migrating a key that has an TTL other than
    -1
Commits on Dec 19, 2011
  1. @nicolasff
  2. @nicolasff

    Added missing parameter.

    nicolasff committed Dec 19, 2011
Commits on Dec 13, 2011
  1. @nicolasff

    Merge branch 'iFullgaz-master'

    nicolasff committed Dec 13, 2011
  2. @nicolasff

    s/_specified/_instance

    nicolasff committed Dec 13, 2011
  3. @nicolasff
  4. @nicolasff

    Make sure publish() can be called in a pipeline.

    nicolasff committed Dec 13, 2011
    This will also make it possible to use publish()
    in a MULTI/EXEC context. Fixes GitHub issue #104.
Something went wrong with that request. Please try again.