Add 'extended-redis-compatibility' config#306
Conversation
Add the config, including docs as comments in valkey.conf. Define SERVER_TITLE "Valkey" in version.h. Make the errors -LOADING, -BUSY and -MISCONF depend on the config. Signed-off-by: Viktor Söderqvist <viktor.soderqvist@est.tech>
… config Signed-off-by: Viktor Söderqvist <viktor.soderqvist@est.tech>
This commit includes a test that will remind us to delete the temporary config when the time comes. Signed-off-by: Viktor Söderqvist <viktor.soderqvist@est.tech>
Signed-off-by: Viktor Söderqvist <viktor.soderqvist@est.tech>
Signed-off-by: Viktor Söderqvist <viktor.soderqvist@est.tech>
161b6d0 to
82b95c8
Compare
Explain the plans for removal in future versions. Signed-off-by: Viktor Söderqvist <viktor.soderqvist@est.tech>
Add the config, including docs as comments in valkey.conf. Define SERVER_TITLE "Valkey" in version.h. Make the errors -LOADING, -BUSY and -MISCONF depend on the config. Signed-off-by: Viktor Söderqvist <viktor.soderqvist@est.tech>
82b95c8 to
8c26e98
Compare
New config 'extended-redis-compatibility' (yes/no) default no
* When yes:
* Use "Redis" in the following error replies:
- `-LOADING Redis is loading the dataset in memory`
- `-BUSY Redis is busy`...
- `-MISCONF Redis is configured to`...
* Use `=== REDIS BUG REPORT` in the crash log delimiters (START and
END).
* The HELLO command returns `"server" => "redis"` and `"version" =>
"7.2.4"` (our Redis OSS compatibility version).
* The INFO field for mode is called `"redis_mode"`.
* When no:
* Use "Valkey" instead of "Redis" in the mentioned errors and crash log
delimiters.
* The HELLO command returns `"server" => "valkey"` and the Valkey
version for `"version"`.
* The INFO field for mode is called `"server_mode"`.
* Documentation added in valkey.conf:
> Valkey is largely compatible with Redis OSS, apart from a few cases
where
> Redis OSS compatibility mode makes Valkey pretend to be Redis. Enable
this
> only if you have problems with tools or clients. This is a temporary
> configuration added in Valkey 8.0 and is scheduled to have no effect
in Valkey
> 9.0 and be completely removed in Valkey 10.0.
* A test case for the config is added. It is designed to fail if the
config is not deprecated (has no effect) in Valkey 9 and deleted in
Valkey 10.
* Other test cases are adjusted to work regardless of this config.
Fixes valkey-io#274
Fixes valkey-io#61
---------
Signed-off-by: Viktor Söderqvist <viktor.soderqvist@est.tech>
| "redis_git_sha1:%s\r\n", serverGitSHA1(), | ||
| "redis_git_dirty:%i\r\n", strtol(serverGitDirty(),NULL,10) > 0, | ||
| "redis_build_id:%s\r\n", serverBuildIdString(), |
There was a problem hiding this comment.
Do you remember why we didn't deal with these fields (redis_git_sha1/redis_git_dirty/redis_build_id)? I thought we did.
There was a problem hiding this comment.
You mean why we didn't rename them to valkey or server?
I think some of maintainers were worried that it would break some tools or clients. I'm not sure. I want to get rid of these names some time. Maybe in 10.0 we can do it?
There was a problem hiding this comment.
Yes, why wasn't server_git_sha1 added in the same way when server.extended_redis_compat was used?
There was a problem hiding this comment.
I tried to change it before 9.0 here:
There was a problem hiding this comment.
Ok, i see #1736 is changing without server.extended_redis_compat, i think it would be great if it they are changeing together. I feel like now we don't have chance to get rid of it.
"%s_mode:", (server.extended_redis_compat ? "redis" : "server"),
"%s\r\n", mode,
There was a problem hiding this comment.
I'm OK with it. I don't know if others will agree... @valkey-io/core-team WDYT?
New config 'extended-redis-compatibility' (yes/no) default no
When yes:
-LOADING Redis is loading the dataset in memory-BUSY Redis is busy...-MISCONF Redis is configured to...=== REDIS BUG REPORTin the crash log delimiters (START and END)."server" => "redis"and"version" => "7.2.4"(our Redis OSS compatibility version)."redis_mode".When no:
"server" => "valkey"and the Valkey version for"version"."server_mode".Documentation added in valkey.conf:
A test case for the config is added. It is designed to fail if the config is not deprecated (has no effect) in Valkey 9 and deleted in Valkey 10.
Other test cases are adjusted to work regardless of this config.
Fixes #274
Fixes #61