diff options
author | antirez <antirez@gmail.com> | 2012-09-04 16:06:53 +0200 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2012-09-27 13:06:12 +0200 |
commit | b8ce9a84c57eba13a157d7c1074254b5ce6bebd3 (patch) | |
tree | c8880ea65ffb05108625baaf693b6f0250e6faf0 | |
parent | 1f8bd82332b7e29ed6c9e5d8b4d17948b4dce6be (diff) | |
download | redis-b8ce9a84c57eba13a157d7c1074254b5ce6bebd3.tar.gz |
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.
-rw-r--r-- | src/sentinel.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/sentinel.c b/src/sentinel.c index 7fdc45e36..70b6aa27c 100644 --- a/src/sentinel.c +++ b/src/sentinel.c @@ -2005,6 +2005,8 @@ void sentinelCommand(redisClient *c) { ri = sentinelGetMasterByName(c->argv[2]->ptr); if (ri == NULL) { 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 { sentinelAddr *addr = ri->addr; |