diff options
author | Binbin <binloveplay1314@qq.com> | 2023-03-21 23:13:31 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-21 17:13:31 +0200 |
commit | 1cb4b1ad07a0c9a0d256a4b947158ae6658458d2 (patch) | |
tree | 925f303021a60decbeda157288d535bd5923af05 | |
parent | 48e0d4788434833b47892fe9f3d91be7687f25c9 (diff) | |
download | redis-1cb4b1ad07a0c9a0d256a4b947158ae6658458d2.tar.gz |
Add missing master_reboot flag in sentinel instance info (#11888)
SRI_MASTER_REBOOT flag was added in #9438
-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 c7e6e3ef2..b4dead7de 100644 --- a/src/sentinel.c +++ b/src/sentinel.c @@ -77,6 +77,7 @@ typedef struct sentinelAddr { #define SRI_FORCE_FAILOVER (1<<11) /* Force failover with master up. */ #define SRI_SCRIPT_KILL_SENT (1<<12) /* SCRIPT KILL already sent on -BUSY */ #define SRI_MASTER_REBOOT (1<<13) /* Master was detected as rebooting */ +/* Note: when adding new flags, please check the flags section in addReplySentinelRedisInstance. */ /* Note: times are in milliseconds. */ #define SENTINEL_PING_PERIOD 1000 @@ -3348,6 +3349,7 @@ void addReplySentinelRedisInstance(client *c, sentinelRedisInstance *ri) { if (ri->flags & SRI_RECONF_DONE) flags = sdscat(flags,"reconf_done,"); if (ri->flags & SRI_FORCE_FAILOVER) flags = sdscat(flags,"force_failover,"); if (ri->flags & SRI_SCRIPT_KILL_SENT) flags = sdscat(flags,"script_kill_sent,"); + if (ri->flags & SRI_MASTER_REBOOT) flags = sdscat(flags,"master_reboot,"); if (sdslen(flags) != 0) sdsrange(flags,0,-2); /* remove last "," */ addReplyBulkCString(c,flags); |