Cluster: clusterBlacklistExists() requires blacklist cleanup before lookup.
This commit is contained in:
parent
a81340abaf
commit
b51be7b34f
@ -671,7 +671,7 @@ void clusterRenameNode(clusterNode *node, char *newname) {
|
|||||||
*
|
*
|
||||||
* Currently the REDIS_CLUSTER_BLACKLIST_TTL is set to 1 minute, this means
|
* Currently the REDIS_CLUSTER_BLACKLIST_TTL is set to 1 minute, this means
|
||||||
* that redis-trib has 60 seconds to send CLUSTER FORGET messages to nodes
|
* that redis-trib has 60 seconds to send CLUSTER FORGET messages to nodes
|
||||||
* in the cluster without dealing with the problem if other nodes re-adding
|
* in the cluster without dealing with the problem of other nodes re-adding
|
||||||
* back the node to nodes we already sent the FORGET command to.
|
* back the node to nodes we already sent the FORGET command to.
|
||||||
*
|
*
|
||||||
* The data structure used is a hash table with an sds string representing
|
* The data structure used is a hash table with an sds string representing
|
||||||
@ -721,6 +721,7 @@ int clusterBlacklistExists(char *nodeid) {
|
|||||||
sds id = sdsnewlen(nodeid,REDIS_CLUSTER_NAMELEN);
|
sds id = sdsnewlen(nodeid,REDIS_CLUSTER_NAMELEN);
|
||||||
int retval;
|
int retval;
|
||||||
|
|
||||||
|
clusterBlacklistCleanup();
|
||||||
retval = dictFind(server.cluster->nodes_black_list,id) != NULL;
|
retval = dictFind(server.cluster->nodes_black_list,id) != NULL;
|
||||||
sdsfree(id);
|
sdsfree(id);
|
||||||
return retval;
|
return retval;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user