Describe the bug
If save option is set to empty string (""), ie if snapshotting is disabled, then config rewrite command doesn't save save option at all.
Therefore, after restart redis have non-empty save option that matches sample in default redis.conf .
To reproduce
Run redis-server with save option set to "" either in config or with runtime command config set save "".
Evaluate config rewrite command.
Rewritten config doesn't contain save "" line.
After restart, redis has non-empty save option.
# redis-cli -p 6380 config get save
1) "save"
2) "3600 1 300 100 60 10000"
Expected behavior
Config contains save "" option.
Comment From: huangzhw
Like https://github.com/redis/redis/issues/8572.
If there is no save, we should emit save "".
Comment From: yossigo
@huangzhw It's not exactly the same issue, #8572 also involves include which is I believe a bigger issue that is not limited to save itself.
Comment From: huangzhw
@yossigo Yes. https://github.com/redis/redis/issues/8572 has more to do. But I think the author just want this.
Comment From: huangzhw
Will we fix this first?
Comment From: JunhuaY
the bug maybe was solved incompletely : when the server is started, and the save option is default, if you issue the " config set save "" " to change the save option, and then issue the “config rewrite” command, the save option change ( from the default to " save "" " ) won't be stored.