"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/cluster.c" between
redis-6.0.7.tar.gz and redis-6.0.8.tar.gz

About: redis is an advanced key-value store. It is often referred to as a data structure server since keys can contain strings, hashes, lists, sets and sorted sets.

cluster.c  (redis-6.0.7):cluster.c  (redis-6.0.8)
skipping to change at line 5767 skipping to change at line 5767
if (error_code) *error_code = CLUSTER_REDIR_UNSTABLE; if (error_code) *error_code = CLUSTER_REDIR_UNSTABLE;
return NULL; return NULL;
} else { } else {
return myself; return myself;
} }
} }
/* Handle the read-only client case reading from a slave: if this /* Handle the read-only client case reading from a slave: if this
* node is a slave and the request is about an hash slot our master * node is a slave and the request is about an hash slot our master
* is serving, we can reply without redirection. */ * is serving, we can reply without redirection. */
int is_readonly_command = (c->cmd->flags & CMD_READONLY) ||
(c->cmd->proc == execCommand && !(c->mstate.cmd_in
v_flags & CMD_READONLY));
if (c->flags & CLIENT_READONLY && if (c->flags & CLIENT_READONLY &&
(cmd->flags & CMD_READONLY || cmd->proc == evalCommand || (is_readonly_command || cmd->proc == evalCommand ||
cmd->proc == evalShaCommand) && cmd->proc == evalShaCommand) &&
nodeIsSlave(myself) && nodeIsSlave(myself) &&
myself->slaveof == n) myself->slaveof == n)
{ {
return myself; return myself;
} }
/* Base case: just return the right node. However if this node is not /* Base case: just return the right node. However if this node is not
* myself, set error_code to MOVED since we need to issue a rediretion. */ * myself, set error_code to MOVED since we need to issue a rediretion. */
if (n != myself && error_code) *error_code = CLUSTER_REDIR_MOVED; if (n != myself && error_code) *error_code = CLUSTER_REDIR_MOVED;
 End of changes. 2 change blocks. 
1 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)