redis-server command line arguments allow passing config name and value in the same arg#10866
Conversation
…ue in the same arg
|
my comment after the discussion with Yossi said that we'll also undo the breaking change that we were aware of. i.e. after finding WDYT? |
|
|
|
for the record 7.0, in this case, argc == 0, in setConfigSaveOption we won't reset the save params, the behavior match 6.2 (the commit i made did not change it) |
|
@oranagra i want to split the "save" changes out of this PR (allow passing config name and value in the sama arg)
in current unstable, redis.conf (save 3600 1)
in this current PR redis.conf (save 3600 1):
|
|
ok, i see what i did differently, indeed i used the default config file (in which the so there was a difference in 6.2 between the first ever in 6.2 the first ever i would also like to note that the default redis.conf that ships with 6.2 did have non-commentated the only things that i think we should change are:
|
|
ok, i got it, so in this PR, the changes around the save are:
|
|
yes, it means we still have a behavior change vs 6.2 (even with default config), but i'm hoping no one is affected (since in 6.2 adding |
|
i'm trying to validate that against 6.2 binary. |
i am guessing, althought we remove the i remove the |
ohh, right. i missed that. |
|
@redis/core-team please approve this un-breaking change. making these previously (unintentionally) working patterns and official thing. |
madolson
left a comment
There was a problem hiding this comment.
Did not review code, approving the un-breaking change.
There is a issue with --sentinel: ``` [root]# src/redis-server sentinel.conf --sentinel --loglevel verbose *** FATAL CONFIG FILE ERROR (Redis 255.255.255) *** Reading the configuration file, at line 352 >>> 'sentinel "--loglevel" "verbose"' Unrecognized sentinel configuration statement ``` This is because in redis#10660 (Redis 7.0.1), `--` prefix change break it. In this PR, we will handle `--sentinel` the same as we did for `--save` in redis#10866. i.e. it's a pseudo config option with no value. Fixes redis#11586. Co-authored-by: Oran Agra <[email protected]>
There is a issue with --sentinel: ``` [root]# src/redis-server sentinel.conf --sentinel --loglevel verbose *** FATAL CONFIG FILE ERROR (Redis 255.255.255) *** Reading the configuration file, at line 352 >>> 'sentinel "--loglevel" "verbose"' Unrecognized sentinel configuration statement ``` This is because in #10660 (Redis 7.0.1), `--` prefix change break it. In this PR, we will handle `--sentinel` the same as we did for `--save` in #10866. i.e. it's a pseudo config option with no value.
There is a issue with --sentinel: ``` [root]# src/redis-server sentinel.conf --sentinel --loglevel verbose *** FATAL CONFIG FILE ERROR (Redis 255.255.255) *** Reading the configuration file, at line 352 >>> 'sentinel "--loglevel" "verbose"' Unrecognized sentinel configuration statement ``` This is because in #10660 (Redis 7.0.1), `--` prefix change break it. In this PR, we will handle `--sentinel` the same as we did for `--save` in #10866. i.e. it's a pseudo config option with no value. (cherry picked from commit 8f13ac1)
There is a issue with --sentinel: ``` [root]# src/redis-server sentinel.conf --sentinel --loglevel verbose *** FATAL CONFIG FILE ERROR (Redis 255.255.255) *** Reading the configuration file, at line 352 >>> 'sentinel "--loglevel" "verbose"' Unrecognized sentinel configuration statement ``` This is because in redis#10660 (Redis 7.0.1), `--` prefix change break it. In this PR, we will handle `--sentinel` the same as we did for `--save` in redis#10866. i.e. it's a pseudo config option with no value.
…ue in the same arg (redis#10866) This commit has two topics. ## Passing config name and value in the same arg In redis#10660 (Redis 7.0.1), when we supported the config values that can start with `--` prefix (one of the two topics of that PR), we broke another pattern: `redis-server redis.config "name value"`, passing both config name and it's value in the same arg, see redis#10865 This wasn't a intended change (i.e we didn't realize this pattern used to work). Although this is a wrong usage, we still like to fix it. Now we support something like: ``` src/redis-server redis.conf "--maxmemory '700mb'" "--maxmemory-policy volatile-lru" --proc-title-template --my--title--template --loglevel verbose ``` ## Changes around --save Also in this PR, we undo the breaking change we made in redis#10660 on purpose. 1. `redis-server redis.conf --save --loglevel verbose` (missing `save` argument before anotehr argument). In 7.0.1, it was throwing an wrong arg error. Now it will work and reset the save, similar to how it used to be in 7.0.0 and 6.2.x. 3. `redis-server redis.conf --loglevel verbose --save` (missing `save` argument as last argument). In 6.2, it did not reset the save, which was a bug (inconsistent with the previous bullet). Now we will make it work and reset the save as well (a bug fix).
There is a issue with --sentinel: ``` [root]# src/redis-server sentinel.conf --sentinel --loglevel verbose *** FATAL CONFIG FILE ERROR (Redis 255.255.255) *** Reading the configuration file, at line 352 >>> 'sentinel "--loglevel" "verbose"' Unrecognized sentinel configuration statement ``` This is because in redis#10660 (Redis 7.0.1), `--` prefix change break it. In this PR, we will handle `--sentinel` the same as we did for `--save` in redis#10866. i.e. it's a pseudo config option with no value.
This PR has two topics.
Passing config name and value in the same arg
In #10660 (Redis 7.0.1), when we supported the config values that can start with
--prefix (one of the two topics of that PR),we broke another pattern:
redis-server redis.config "name value", passing both config nameand it's value in the same arg, see #10865
This wasn't a intended change (i.e we didn't realize this pattern used to work).
Although this is a wrong usage, we still like to fix it.
Now we support something like:
Changes around --save
Also in this PR, we undo the breaking change we made in #10660 on purpose.
redis-server redis.conf --save --loglevel verbose(missingsaveargument before anotehr argument).In 7.0.1, it was throwing an wrong arg error.
Now it will work and reset the save, similar to how it used to be in 7.0.0 and 6.2.x.
redis-server redis.conf --loglevel verbose --save(missingsaveargument as last argument).In 6.2, it did not reset the save, which was a bug (inconsistent with the previous bullet).
Now we will make it work and reset the save as well (a bug fix).