diff options
author | michael-grunder <michael.grunder@gmail.com> | 2015-03-04 07:12:34 +0300 |
---|---|---|
committer | michael-grunder <michael.grunder@gmail.com> | 2015-05-06 01:16:49 +0300 |
commit | 469e8e93774d75c9649075ede1549aeedb68928b (patch) | |
tree | 668408e49f88704ccf590288e4930c1243a665da /cluster_library.h | |
parent | 47b05f13b9d575c52b1da4b2ff9e66149f6d8087 (diff) |
Various cluster fixes and Unit test updates
* 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.
Diffstat (limited to 'cluster_library.h')
-rw-r--r-- | cluster_library.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cluster_library.h b/cluster_library.h index 457a9694..18fff7d5 100644 --- a/cluster_library.h +++ b/cluster_library.h @@ -203,6 +203,10 @@ typedef struct redisCluster { clusterFoldItem *multi_head; clusterFoldItem *multi_curr; + /* When we issue EXEC to nodes, we need to keep track of how many replies + * we have, as this can fail for various reasons (EXECABORT, watch, etc.) */ + char multi_len[REDIS_CLUSTER_SLOTS]; + /* Variable to store MULTI response */ zval *multi_resp; |