diff options
author | michael-grunder <michael.grunder@gmail.com> | 2014-06-14 03:41:37 +0400 |
---|---|---|
committer | michael-grunder <michael.grunder@gmail.com> | 2015-05-06 01:00:51 +0300 |
commit | 2451c75ed8fbb11d4f444a2c68dc69e5941f8e95 (patch) | |
tree | fb69d90838a3c7ea59c5bf1f94f9de1622e7c4c4 /php_redis.h | |
parent | 846f945f7df803d003d8c6c45e628e72ac736f7c (diff) |
WATCH command
Implemented the WATCH command for RedisCluster. This command can
take any number of keys, so phpredis splits the request across the
cluster in the best way it can.
For every key in a multiple key command, Redis Cluster requires
that they all hash to the same SLOT, else it will return a
CROSSLOT error and fail.
For WATCH in RedisCluster, a few things to note:
* The command will fail if phpredis is out of sync with the keyspace.
This is because we'll need to know where to deliver each command,
or can't possibly deliver them correctlhy.
* The command will fail if any command delivery failures occur on any
node. This is the case either for a normal communication error or
if RedisCluster returns to us MOVED/ASK redirection.
Diffstat (limited to 'php_redis.h')
-rw-r--r-- | php_redis.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/php_redis.h b/php_redis.h index cce5b29a..0368b17a 100644 --- a/php_redis.h +++ b/php_redis.h @@ -271,13 +271,13 @@ ZEND_END_MODULE_GLOBALS(redis) #endif struct redis_queued_item { - /* reading function */ - zval * (*fun)(INTERNAL_FUNCTION_PARAMETERS, RedisSock *redis_sock, ...); + /* reading function */ + zval * (*fun)(INTERNAL_FUNCTION_PARAMETERS, RedisSock *redis_sock, ...); - char *cmd; - int cmd_len; + char *cmd; + int cmd_len; - struct redis_queued_item *next; + struct redis_queued_item *next; }; extern zend_module_entry redis_module_entry; |