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
diff options
context:
space:
mode:
-rw-r--r--cluster_library.c2
-rw-r--r--cluster_library.h7
-rw-r--r--redis.c7
-rw-r--r--redis_commands.c30
4 files changed, 2 insertions, 44 deletions
diff --git a/cluster_library.c b/cluster_library.c
index 8d0470ad..b71d85ef 100644
--- a/cluster_library.c
+++ b/cluster_library.c
@@ -1210,7 +1210,7 @@ PHPAPI int cluster_send_slot(redisCluster *c, short slot, char *cmd,
PHPAPI short cluster_send_command(redisCluster *c, short slot, const char *cmd,
int cmd_len TSRMLS_DC)
{
- int resp, rslot = slot;
+ int resp;
// Issue commands until we find the right node or fail
do {
diff --git a/cluster_library.h b/cluster_library.h
index 1ea3dc01..f020d487 100644
--- a/cluster_library.h
+++ b/cluster_library.h
@@ -19,13 +19,6 @@
/* Length of a cluster name */
#define CLUSTER_NAME_LEN 40
-/* RedisCluster class constants */
-#define CLUSTER_OPT_DISTRIBUTE 5
-
-/* Maintain order of execution vs. efficiency of delivery */
-#define CLUSTER_DIST_OOE 0
-#define CLUSTER_DIST_SPEED 1
-
/* The parts for our cluster nodes command */
#define CLUSTER_NODES_HASH 0
#define CLUSTER_NODES_HOST_PORT 1
diff --git a/redis.c b/redis.c
index 4b907fd3..5e38601f 100644
--- a/redis.c
+++ b/redis.c
@@ -524,12 +524,7 @@ static void add_class_constants(zend_class_entry *ce, int is_cluster) {
/* Settings specific to RedisCluster */
static void add_cluster_constants(zend_class_entry *ce) {
- /* options */
- add_constant_long(ce, "OPT_DISTRIBUTE", CLUSTER_OPT_DISTRIBUTE);
-
- /* Distribution settings */
- add_constant_long(ce, "DIST_OOE", CLUSTER_DIST_OOE);
- add_constant_long(ce, "DIST_SPEED", CLUSTER_DIST_SPEED);
+ // TODO: Placeholder if we add constants
}
/**
diff --git a/redis_commands.c b/redis_commands.c
index 6e5e1311..14503f26 100644
--- a/redis_commands.c
+++ b/redis_commands.c
@@ -2377,16 +2377,6 @@ void redis_getoption_handler(INTERNAL_FUNCTION_PARAMETERS,
RETURN_FALSE;
}
- // Check if we're asking for a RedisCluster specific option
- if(c != NULL && option > REDIS_OPT_SCAN) {
- switch(option) {
- case CLUSTER_OPT_DISTRIBUTE:
- RETURN_LONG(c->dist_mode);
- default:
- RETURN_FALSE;
- }
- }
-
// Return the requested option
switch(option) {
case REDIS_OPT_SERIALIZER:
@@ -2419,26 +2409,6 @@ void redis_setoption_handler(INTERNAL_FUNCTION_PARAMETERS,
RETURN_FALSE;
}
- // If we've been passed a RedisCluster object, check if the option
- // being set is specific to RedisCluster.
- if(c != NULL && option > REDIS_OPT_SCAN) {
- switch(option) {
- case CLUSTER_OPT_DISTRIBUTE:
- val_long = atol(val_str);
- if(val_long == CLUSTER_DIST_OOE ||
- val_long == CLUSTER_DIST_SPEED)
- {
- c->dist_mode = val_long;
- RETURN_TRUE;
- } else {
- RETURN_FALSE;
- }
- break;
- default:
- RETURN_FALSE;
- }
- }
-
switch(option) {
case REDIS_OPT_SERIALIZER:
val_long = atol(val_str);