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
2020-09-28Issue.1847 cluster segfault (#1850)Michael Grunder
Fix for #1847 when dealing with NULL multi bulk replies in RedisCluster. Adds `Redis::OPT_NULL_MULTIBULK_AS_NULL` setting to have PhpRedis treat NULL multi bulk replies as `NULL` instead of `[]`. Co-authored-by: Alex Offshore <offshore@aopdg.ru>
2020-07-07Issue #1607 (#1806)Pavlo Yatsukhnenko
2020-06-25Support for Redis 6 ACLs (#1791)Michael Grunder
Add support for Redis 6 ACLs in the `Redis`, `RedisCluster`, and `RedisArray` classes. On a related note, it adds a mechanism for users to customize how we generate persistent connection IDs such that they can be grouped in different ways depending on the specific use case required (e.g. it would allow connections to be grouped by username, or by user-defined persistent_id, or both).
2020-06-07Issue.1765 (#1774)Michael Grunder
Various improvements and fixes to cluster slot caching. * Improves slot caching so any unique set of seeds all hash to the same key * Fix a couple of memory leaks. * Fixes a segfault when executing a multiple key command such as `MGET` or `MSET` while the cluster is resharding.
2020-06-05Store auth information in cluster->flags->authPavlo Yatsukhnenko
2020-03-30Authenticate in redis_sock_server_openPavlo Yatsukhnenko
2020-03-11Various small changes in cluster_libraryPavlo Yatsukhnenko
2020-01-31Initial commit of ASK redirection fixmichael-grunder
See #1693
2020-01-06Fix typos detected by codespellTyson Andre
2019-12-02Enable slot caching for session clusterMichael Booth
2019-07-09cleanup TSRMLS_* usageRemi Collet
2019-06-12Fix xInfo ro RedisClusterPavlo Yatsukhnenko
2019-05-13Adds OPT_REPLY_LITERAL for rawCommand and EVALmichael-grunder
Adds an option to process the actual strings in simple string replies as opposed to translating them to `true`. This only applies to `rawCommand` and `eval` because as far as I know know vanilla Redis command attaches any information besides `OK` to simple string replies. Addresses #1550
2019-02-09WIP: Reimplementation of cluster slot cachingmichael-grunder
RedisCluster currently has a high construction overhead because every request has to issue a CLUSTER SLOTS command to map the keyspace. The issue is especially evident when a request only does a few commands.
2019-01-27PHP 5 is dead, long live PHP 7michael-grunder
This commit removes support for PHP 5 by getting rid of all of our Zend compatibility layer methods, as well as any call checking against PHP_MAJOR_VERSION or ZEND_MODULE_API_NO. Unit tests are all passing for Redis, RedisCluster, and RedisArray but this should still be considered a work in progress until more testing can be done. Addresses issue #1448
2019-01-18RedisCluster authPavlo Yatsukhnenko
2018-10-08Reset the socket after a timeout to make sure no wrong data is received (#1417)Marc de Jonge
* Reset the socket after a timeout to make sure no wrong data is received * Remove the lazy_connect completely * Missing TSRMLS_CC * Remove redundant check if the stream exists * Add the redis_sock_server_open to the CLUSTER_SEND_PAYLOAD macro
2018-09-29Streams (#1413)Michael Grunder
Streams API
2018-08-22Change connect/reconnect logicPavlo Yatsukhnenko
Persistant connections can be closed via close method. Connection marked as failed only after reconnection attempts.
2018-05-31Issue #1358Pavlo Yatsukhnenko
Use `cluster_free` in `free_cluster_context` to free cluster object. Call `cluster_disconnect` before destroying cluster object.
2017-08-16Use zend_string to store strings in RedisSockPavlo Yatsukhnenko
Following fields were changed: err, prefix, persistent_id, auth and host
2017-03-29Remove unused force_connect parameter from redis_sock_server_open function.Pavlo Yatsukhnenko
2016-12-21change redis_serialize to accept strlen_tRemi Collet
2016-11-29Issue #1036Pavlo Yatsukhnenko
2016-11-23Unbreak php7 fix for php <= 7.0michael-grunder
2016-11-23Move zend_object handler to the endmichael-grunder
In php7 the zend_object handler structure is inlined (is no longer a pointer, but rather variable sized depending on various things, so it needs to be at the end of the container class. This is mentioned in the extensive /s upgrading documentation from Zend See "custom objects": https://wiki.php.net/phpng-upgrading In addition I believe that the zend library now takes care of freeing the overall structure, so that shouldn't be done anymore if running php >= 7.0.0.
2016-11-12WIP: php7 compatibilityPavlo Yatsukhnenko
2016-10-11WIP: php7 compatibilityPavlo Yatsukhnenko
Redefine add_next_index_stringl
2016-10-09WIP: php7 compatibilityPavlo Yatsukhnenko
RETVAL_STRING and RETVAL_STRINGL always duplicate value
2016-09-28WIP: php7 compatibilityPavlo Yatsukhnenko
Rename zend_rsrc_list_entry to zend_resource
2016-09-06rename smart_str to smart_stringPavlo Yatsukhnenko
2016-03-31Merging in logic from #777 to shuffle cluster seedsmichael-grunder
2016-03-30Reduce number of connections to one cluster node by shuffling nodes.Vitaliy Stepanyuk
2015-06-20Persistent connections for cluster and possible crash fixmichael-grunder
2015-06-17Initial commit for cluster-enabled session handlingmichael-grunder
2015-05-06Use win32 function prototypes for lib functionsmichael-grunder
2015-05-06Make RedisCluster::client('list') work like Redismichael-grunder
2015-05-06Response handler fixesmichael-grunder
* Fixed serialization for various multi-bulk responses * Properly handle NULL BULK replies for variant replies
2015-05-06Various cluster fixes and Unit test updatesmichael-grunder
* Updated the unit test suite to print each unit test method name we're running as we do so, and also with fancy colors :-) * Added functionality to handle failed transactions, where Redis will send us a multi bulk length of -1. This can happen because of an EXECABORT error, or because a watched key was modified during the transaction * Initialize serialized return value to NULL to avoid segfault * use strtol not atoi in our long response handler, to handle large values * Fixed our return value in multi responses * Fiexed type() command as cluster doesn't still have the '+' prefix when checking for what TYPE returns * Exists should return a BOOLEAN not 1/0 * Fixed sRandMember to work in the context of a MULTI block * Use "LINDEX" not "LGET" as "LGET" isn't a valid Redis command * Properly set our slot for the PFCOUNT command * Many unit test changes such that Redis and RedisCluster are happy using mostly the same ones.
2015-05-06More updates for auto-failover logicmichael-grunder
2015-05-06Add functionality to specify cluster configuration in redis.inimichael-grunder
2015-05-06Fix ZTS typosmichael-grunder
2015-05-06Remove deprecated definesmichael-grunder
2015-05-06Initial commit incorporating a "readonly" flag.michael-grunder
We may want to configure phpredis such that it will attempt to fall back to a given master's slave, if the master were to go down (and the command is read only).
2015-05-06Initial commit of formalized "redirection" timeout logicmichael-grunder
When phpredis is communicating with a cluster, there are two different kinds of timeout events. The first, is your standard read or write timeout where the socket is blocked either because of network issues, or because Redis is taking longer than the timeout to complete the request. The second is unique to cluster. Because Redis Cluster attempts to automatically failover (in the case of replicas), phpredis cluster will attempt to get data from a node where it thinks the key would live, and upon a failure to connect, try a different node (at random). This is because Redis could be resharding the connection and may point the client to a new (now good node). However, if it's not yet detected a failure, it will just bounce us back to the prior node (which could be actually down or have just sputtered due to various issues). So in this case, phpredis uses a second timeout mechanism where we keep track (in milleseconds) when we entered the query/response loop. Once we've been unsuccessful up to this timeout, phpredis will abort with a different (catchable) exception. TODO: It may be a good idea to implement some small delay, so we don't hit the cluster with lots of requests over and over until the cluster comes back.
2015-05-06Added READONLY and READWRITE RESP for future slave failover logicmichael-grunder
2015-05-06Update redirection logic to throw on CLUSTERDOWNmichael-grunder
When Redis Cluster responds with a CLUSTERDOWN error, we should throw an exception. It seems that in the current state of cluster (during slave election), it will enter a CLUSTERDOWN state for a short period of time. This allows clients to trap the exception and then either wait and try again, or do something else.
2015-05-06PING responsemichael-grunder
Implemented PING for RedisCluster
2015-05-06INFO command as well as a direct slot tweakmichael-grunder
This commit implements the INFO command for RedisCluster, which behaves like other direct to node commands and can take either a key or a host and port. Updated cluster_send_slot function such that on success it sets the proper reply slot.
2015-05-06SCAN commandmichael-grunder
Initial commit of the SCAN command for cluster. As a first iteration, the command takes a host:port string (which can be retreived from the introspection method RedisCluster::_masters()), to scan either everything in the cluster (e.g. in a loop), or one in particular. A simple way to scan everything in the whole cluster Keyspace $obj_c->setOption(RedisCluster::OPT_SCAN, RedisCluster::SCAN_RETRY); foreach($obj_c->_masters() as $str_hash) { $it = NULL; while($arr = $obj_c->scan($it, $str_hash)) { foreach($arr as $key) { echo "$str_hash -> " . $key . "\n"; } } }