Add sentinel debug option command#9291
Merged
yossigo merged 8 commits intoredis:unstablefrom Aug 5, 2021
Merged
Conversation
Contributor
Author
|
DEBUG command has many subcommands. For example, DEBUG set-skip-cheksum-validation 0|1, DEBUG lua-always-replicate-commands 0|1 etc. Here we want to modify the config parameters only for test purpose instead of in a real world system. |
Once sentinel_ping_period update, then sentinel_tilt_period will be updated as well
yossigo
reviewed
Aug 4, 2021
src/sentinel.c
Outdated
| static mstime_t sentinel_info_period = 10000; | ||
| static mstime_t sentinel_ping_period = SENTINEL_PING_PERIOD; | ||
| static mstime_t sentinel_ask_period = 1000; | ||
| static mstime_t sentinel_publish_period = 1000; |
Collaborator
There was a problem hiding this comment.
Suggested change
| static mstime_t sentinel_publish_period = 1000; | |
| static mstime_t sentinel_publish_period = 2000; |
I assume we want to preserve the old behavior.
src/sentinel.c
Outdated
| } | ||
| } else if (!strcasecmp(argv[0],"announce-ip") && argc == 2) { | ||
| /* announce-ip <ip-address> */ | ||
| /* announce-ip <ip-address> */ |
src/sentinel.c
Outdated
Comment on lines
2041
to
2042
| } | ||
| else { |
yossigo
approved these changes
Aug 5, 2021
Collaborator
|
Merged, thanks @hwware! |
JackieXie168
pushed a commit
to JackieXie168/redis
that referenced
this pull request
Sep 8, 2021
This makes it possible to tune many parameters that were previously hard coded. We don't intend these to be user configurable, but only used by tests to accelerate certain conditions which would otherwise take a long time and slow down the test suite. Co-authored-by: Lucas Guang Yang <[email protected]>
enjoy-binbin
added a commit
to enjoy-binbin/redis
that referenced
this pull request
Feb 7, 2022
Because SENTINEL DEBUG missing summary in its json file, with the change in redis#10043, the following assertion will fail. ``` [redis]# src/redis-cli -p 26379 redis-cli: redis-cli.c:678: cliInitCommandHelpEntry: Assertion `reply->type == 1' failed. ``` This commit add the summary and complexity for SENTINEL DEBUG, which introduced in redis#9291, and also improved the help message.
oranagra
pushed a commit
that referenced
this pull request
Feb 7, 2022
…ry (#10250) Fix redis-cli with sentinel crash due to SENTINEL DEBUG missing summary Because SENTINEL DEBUG missing summary in its json file, with the change in #10043, the following assertion will fail. ``` [redis]# src/redis-cli -p 26379 redis-cli: redis-cli.c:678: cliInitCommandHelpEntry: Assertion `reply->type == 1' failed. ``` This commit add the summary and complexity for SENTINEL DEBUG, which introduced in #9291, and also improved the help message.
guanmengshi
added a commit
to guanmengshi/redis
that referenced
this pull request
Feb 8, 2022
There are two issues in SENTINEL DEBUG: 1. The error message should mention SENTINEL DEBUG 2. Add missing reuturn in args parse. ``` redis> sentinel debug INFO-PERIOD aaa (error) ERR Invalid argument 'aaa' for SENTINEL SET 'INFO-PERIOD' redis> sentinel debug a b c d (error) ERR Unknown option or number of arguments for SENTINEL SET 'a' redis> ping (error) ERR Unknown option or number of arguments for SENTINEL SET 'b' ``` Introduced in redis#9291. Also do some cleanups in the code.
oranagra
pushed a commit
that referenced
this pull request
Feb 8, 2022
There are two issues in SENTINEL DEBUG: 1. The error message should mention SENTINEL DEBUG 2. Add missing reuturn in args parse. ``` redis> sentinel debug INFO-PERIOD aaa (error) ERR Invalid argument 'aaa' for SENTINEL SET 'INFO-PERIOD' redis> sentinel debug a b c d (error) ERR Unknown option or number of arguments for SENTINEL SET 'a' redis> ping (error) ERR Unknown option or number of arguments for SENTINEL SET 'b' ``` Introduced in #9291. Also do some cleanups in the code.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For test purpose, we could change some parameters by SENTINEL DEBUG command
It is mentioned in the following 2 PR:
#8891 and #8710
The command format has 2 options:
SENTINEL DEBUG: display our current configurable parameters value

SENTINEL DEBUG [ ...]: update our current configurable parameters values (one or more)
for example: sentinel debug info-period 6000
These configurable parameters as following:
SENTINEL_INFO_PERIOD
SENTINEL_PING_PERIOD
SENTINEL_ASK_PERIOD
SENTINEL_PUBLISH_PERIOD
SENTINEL_DEFAULT_DOWN_AFTER
SENTINEL_TILT_TRIGGER
SENTINEL_TILT_PERIOD
SENTINEL_SLAVE_RECONF_TIMEOUT
SENTINEL_MIN_LINK_RECONNECT_PERIOD
SENTINEL_ELECTION_TIMEOUT
SENTINEL_SCRIPT_MAX_RUNTIME
SENTINEL_SCRIPT_RETRY_DELAY
SENTINEL_DEFAULT_FAILOVER_TIMEOUT