Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
afe28cfd
Commit
afe28cfd
authored
Mar 07, 2014
by
antirez
Browse files
Cluster: fix conditional generating TRYAGAIN error.
parent
aa5898f5
Changes
1
Show whitespace changes
Inline
Side-by-side
src/cluster.c
View file @
afe28cfd
...
@@ -3957,13 +3957,14 @@ clusterNode *getNodeByQuery(redisClient *c, struct redisCommand *cmd, robj **arg
...
@@ -3957,13 +3957,14 @@ clusterNode *getNodeByQuery(redisClient *c, struct redisCommand *cmd, robj **arg
return server.cluster->migrating_slots_to[slot];
return server.cluster->migrating_slots_to[slot];
}
}
/* If we are receiving the slot, we have all the keys, and the client
/* If we are receiving the slot, and the client correctly flagged the
* correctly flagged the request as "ASKING", we can serve
* request as "ASKING", we can serve the request. However if the request
* the request, otherwise the only option is to send a TRYAGAIN error. */
* involves multiple keys and we don't have them all, the only option is
* to send a TRYAGAIN error. */
if (importing_slot &&
if (importing_slot &&
(c->flags & REDIS_ASKING || cmd->flags & REDIS_CMD_ASKING))
(c->flags & REDIS_ASKING || cmd->flags & REDIS_CMD_ASKING))
{
{
if (missing_keys) {
if (
multiple_keys &&
missing_keys) {
if (error_code) *error_code = REDIS_CLUSTER_REDIR_UNSTABLE;
if (error_code) *error_code = REDIS_CLUSTER_REDIR_UNSTABLE;
return NULL;
return NULL;
} else {
} else {
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment