Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpredis/phpredis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2012-05-29MIGRAGE commandmichael-grunder
2012-05-18Merge remote-tracking branch 'upstream/master'michael-grunder
2012-05-18Add BITCOUNT.Nicolas Favre-Felix
Included docs.
2012-05-18Add GITOP.Nicolas Favre-Felix
Included docs.
2012-05-12getLastError methodmichael-grunder
2012-05-11_prefix, _unserialize methodsmichael-grunder
2012-05-11DUMP, RESTORE commandsmichael-grunder
2012-05-11SCRIPT commandmichael-grunder
2012-05-10Initial commit of EVAL and EVALSHAmichael-grunder
2012-05-04Implemented INCRBYFLOAT and HINCRBYFLOATmichael-grunder
2012-04-29Add PEXPIREAT.Nicolas Favre-Felix
Fixes GitHub issue #147.
2012-04-29Add PTTL.Nicolas Favre-Felix
2012-04-29Add PEXPIRE.Nicolas Favre-Felix
2012-04-29Add PSETEX.Nicolas Favre-Felix
2012-04-16Add ECHO.Nicolas Favre-Felix
Covered by unit test; fixes GitHub issue #165.
2012-04-09Tagged 2.2.12.2.1Nicolas Favre-Felix
2012-02-28Move latent DISCARD into stuff into a proper __destruct(or)michael-grunder
2012-01-02Merge branch 'master' of https://github.com/imvu/phpredis into imvu-masterNicolas Favre-Felix
2011-12-30Fixed issue with HDEL in serialize mode.Nicolas Favre-Felix
Addresses GitHub issue #114. Fixed unit test as well.
2011-12-29add config functionDavid Edler
2011-12-23fixing issue with re-connect logicEric Hohenstein
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.
2011-08-02Better variadic function, variadic HDEL.Nicolas Favre-Felix
2011-07-08Added resetStat functionErik Dubbelboer
2011-06-30Build fix for win32 (phpredis 2.1.3)Charles
2011-05-20version bump after tagging mistake2.1.3Nicolas Favre-Felix
2011-05-20Version bump to 2.1.1Nicolas Favre-Felix
2011-04-28Added BRPOPLPUSH.Nicolas Favre-Felix
2011-04-06Added OBJECT command.Nicolas Favre-Felix
2011-01-24Add missing ZREMRANGEBYRANK + doc, tests.Nicolas Favre-Felix
2011-01-24Add HSETNX.Nicolas Favre-Felix
2011-01-20removed dead code.2.1.0Nicolas Favre-Felix
2011-01-20Added MSETNX.Nicolas Favre-Felix
2011-01-14Change version to 2.1.0Nicolas Favre-Felix
2010-12-28Added ZREVRANGEBYSCORE.Nicolas Favre-Felix
2010-12-28Merge branch 'master' into serializerNicolas Favre-Felix
Conflicts: library.c
2010-12-17Added GETBIT, SETBIT with doc and unit tests.Nicolas Favre-Felix
2010-12-16Added SETRANGE, missing doc and tests.Nicolas Favre-Felix
2010-12-16Replaced SUBSTR with GETRANGE.Nicolas Favre-Felix
2010-12-15Merge branch 'master' into serializerNicolas Favre-Felix
2010-12-15added pconnect, has to be tested and checkedSimon Effenberg
2010-12-13Merge branch 'master' into serializerNicolas Favre-Felix
2010-12-13Fixed a large number of warnings when compiled with -Wall (thanks to github ↵Nicolas Favre-Felix
user lstrojny for the initial work on this).
2010-12-12Serializing option for HGET/HSET/HGETALL.Nicolas Favre-Felix
2010-12-09First work on serializer.Nicolas Favre-Felix
2010-11-17Added more contact info, version 2.0.112.0.11Nicolas Favre-Felix
2010-10-29Version bump, 2.0.102.0.10Nicolas Favre-Felix
2010-10-25Added INCR aliases.Nicolas Favre-Felix
2010-10-21Added SLAVEOF.Nicolas Favre-Felix
2010-10-12release 2.0.82.0.8Nicolas Favre-Felix
2010-10-12Fixes for static compilation.Nicolas Favre-Felix