mirror of
https://github.com/fluencelabs/redis
synced 2025-03-30 22:31:03 +00:00
Sentinel: reply -IDONTKNOW to get-master-addr-by-name on lack of info.
If we don't have any clue about a master since it never replied to INFO so far, reply with an -IDONTKNOW error to SENTINEL get-master-addr-by-name requests.
This commit is contained in:
parent
8bdde086ac
commit
9bd0e097aa
@ -2005,6 +2005,8 @@ void sentinelCommand(redisClient *c) {
|
|||||||
ri = sentinelGetMasterByName(c->argv[2]->ptr);
|
ri = sentinelGetMasterByName(c->argv[2]->ptr);
|
||||||
if (ri == NULL) {
|
if (ri == NULL) {
|
||||||
addReply(c,shared.nullmultibulk);
|
addReply(c,shared.nullmultibulk);
|
||||||
|
} else if (ri->info_refresh == 0) {
|
||||||
|
addReplySds(c,sdsnew("-IDONTKNOW I have not enough information to reply. Please ask another Sentinel.\r\n"));
|
||||||
} else {
|
} else {
|
||||||
sentinelAddr *addr = ri->addr;
|
sentinelAddr *addr = ri->addr;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user