Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
1cb4b1ad
Unverified
Commit
1cb4b1ad
authored
Mar 21, 2023
by
Binbin
Committed by
GitHub
Mar 21, 2023
Browse files
Add missing master_reboot flag in sentinel instance info (#11888)
SRI_MASTER_REBOOT flag was added in #9438
parent
48e0d478
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/sentinel.c
View file @
1cb4b1ad
...
@@ -77,6 +77,7 @@ typedef struct sentinelAddr {
...
@@ -77,6 +77,7 @@ typedef struct sentinelAddr {
#define SRI_FORCE_FAILOVER (1<<11)
/* Force failover with master up. */
#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_SCRIPT_KILL_SENT (1<<12)
/* SCRIPT KILL already sent on -BUSY */
#define SRI_MASTER_REBOOT (1<<13)
/* Master was detected as rebooting */
#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. */
/* Note: times are in milliseconds. */
#define SENTINEL_PING_PERIOD 1000
#define SENTINEL_PING_PERIOD 1000
...
@@ -3348,6 +3349,7 @@ void addReplySentinelRedisInstance(client *c, sentinelRedisInstance *ri) {
...
@@ -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_RECONF_DONE
)
flags
=
sdscat
(
flags
,
"reconf_done,"
);
if
(
ri
->
flags
&
SRI_FORCE_FAILOVER
)
flags
=
sdscat
(
flags
,
"force_failover,"
);
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_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 "," */
if
(
sdslen
(
flags
)
!=
0
)
sdsrange
(
flags
,
0
,
-
2
);
/* remove last "," */
addReplyBulkCString
(
c
,
flags
);
addReplyBulkCString
(
c
,
flags
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment