Commit Graph

12215 Commits

Author SHA1 Message Date
Harkrishn Patro
ebfb440629
Pass extensions to node if extension processing is handled by it (#52)
Ref: https://github.com/redis/redis/pull/12760

### Description

#### Fixes compatibilty of PlaceholderKV cluster (7.2 - extensions
enabled by default) with older Redis cluster (< 7.0 - extensions not
handled) .

With some of the extensions enabled by default in 7.2 version, new nodes
running 7.2 and above start sending out larger clusterbus message
payload including the ping extensions. This caused an incompatibility
with node running engine versions < 7.0. Old nodes (< 7.0) would receive
the payload from new nodes (> 7.2) would observe a payload length
(totlen) > (estlen) and would perform an early exit and won't process
the message.

This fix introduces a flag `extensions_supported` on the clusterMsg
indicating the sender node can handle extensions parsing. Once, a
receiver nodes receives a message with this flag set to 1, it would
update clusterNode new field extensions_supported and start sending out
extensions if it has any.


This PR also introduces a DEBUG sub command to enable/disable cluster
message extensions `process-clustermsg-extensions` feature.

Note: A successful `PING`/`PONG` is required as a sender for a given
node to be marked as `extensions_supported` and then extensions message
will be sent to it. This could cause a slight delay in receiving the
extensions message(s).

### Testing

TCL test verifying the cluster state is healthy irrespective of
enabling/disabling cluster message extensions feature.

---------

Signed-off-by: Harkrishn Patro <harkrisp@amazon.com>
2024-04-08 09:01:30 -07:00
Bany
d92dc78cb8
Update ValkeyModuleEvent_MasterLinkChange to ValkeyModuleEvent_PrimaryLinkChange (#262)
Update ValkeyModuleEvent_MasterLinkChange to ValkeyModuleEvent_PrimaryLinkChange

Signed-off-by: 0del <bany.y0599@gmail.com>
2024-04-08 08:56:39 -07:00
Madelyn Olson
6411629c61
Madelyn's attempt as a logo (#251)
Apply new logo at startup.

It is one character wider and 2 characters taller than the original
Redis logo.

---------

Signed-off-by: Madelyn Olson <madelyneolson@gmail.com>
2024-04-07 17:30:38 -07:00
Viktor Söderqvist
d26d596b3e
Log branding (#252)
Small changes to the log messages printed during startup and shutdown,
for Valkey branding.

SERVER_NAME is replaced by verbatim "Valkey" in one place, because
SERVER_NAME expands to "valkey" in lowercase. (Should we introduce
another macro that expands to "Valkey"?)

Signed-off-by: Viktor Söderqvist <viktor.soderqvist@est.tech>
2024-04-07 17:28:02 -07:00
Arpit Pandey
1b47daff09
Fix: Typo clock_getting -> clock_gettime (#244)
typo in comment monotonic.c file:- 

Changed: faster than calling 'clock_getting' (POSIX) 
To: faster than calling 'clock_gettime' (POSIX)

Signed-off-by: Arpit Pandey <arpit.pandey05@gmail.com>
2024-04-07 14:49:14 -07:00
Madelyn Olson
9f03dfc1f6
Fix two typos that were flagged in the 7.2 build (#248)
These were flagged on the 7.2 build system, which is using the old spell
check. I think we should consider re-adding it as it missed some typos.

Relevant: https://github.com/valkey-io/valkey/pull/72

Signed-off-by: Madelyn Olson <madelyneolson@gmail.com>
2024-04-07 00:07:51 -07:00
0del
717ec1e144
Rename ValkeyModule_DefragModuleString to ValkeyModule_DefragValkeyModuleString (#243)
fixes: #242

---------

Signed-off-by: 0del <bany.y0599@gmail.com>
Co-authored-by: Viktor Söderqvist <viktor.soderqvist@est.tech>
2024-04-06 22:50:56 +02:00
Vitah Lin
ba0c93cbdf
Add redis symlinks at the same place as the installed binaries (#193)
Adds a new make variable called `USE_REDIS_SYMLINKS`, with default value
`yes`. If yes, then `make install` creates additional symlinks to the
installed binaries:

* `valkey-server`
* `valkey-cli`
* `valkey-benchmark`
* `valkey-check-rdb`
* `valkey-check-aof`
* `valkey-sentinel`

The names of the symlinks are the legacy redis binary names
(`redis-server`, etc.). The purpose is to provide backward compatibility
for scripts expecting the these filenames. The symlinks are installed in
the same directory as the binaries (typically `/usr/local/bin/` or
similar).

Similarly, `make uninstall` removes these symlinks if
`USE_REDIS_SYMLINKS` is `yes`.

This is described in a note in README.md.

Fixes #147

---------

Signed-off-by: Vitah Lin <vitahlin@gmail.com>
Co-authored-by: Madelyn Olson <34459052+madolson@users.noreply.github.com>
2024-04-06 18:41:53 +02:00
Parth
620d325fdc
Adding server.call/pcall option to LUA scripting. (#136) (#213)
This commit does not remove redis.call/pcall just yet. It also does not
rename Redis in error messages such as "Please specify at least one
argument for this redis lib call". This allows users to maintain full
backwards compatibility while introducing an option to use server.call
for new code.

I verified that the unit tests pass. Also manually verified that the
redis-server responds to server.call invocations within lua scripting.
Also verified that function registration works as expected.

```
[ok]: EVAL - is Lua able to call Redis API? (0 ms)
[ok]: EVAL - is Lua able to call Server API? (1 ms)
[ok]: EVAL - No arguments to redis.call/pcall is considered an error (0 ms)
[ok]: EVAL - No arguments to server.call/pcall is considered an error (1 ms)
```

---------

Signed-off-by: Parth Patel <661497+parthpatel@users.noreply.github.com>
Signed-off-by: Madelyn Olson <madelyneolson@gmail.com>
Co-authored-by: Madelyn Olson <madelyneolson@gmail.com>
2024-04-05 21:17:11 -07:00
Madelyn Olson
bc28fb4ac0
Update Server version to valkey version (#232)
This commit updates the following fields:
1. server_version -> valkey_version in server info. Since we would like
to advertise specific compatibility, we are making the version specific
to valkey. servername will remain as an optional indicator, and other
valkey compatible stores might choose to advertise something else.
1. We dropped redis-ver from the API. This isn't related to API
compatibility, but we didn't want to "fake" that valkey was creating an
rdb from a Redis version.
1. Renamed server-ver -> valkey_version in rdb info. Same as point one,
we want to explicitly indicate this was created by a valkey server.

---------

Signed-off-by: Madelyn Olson <madelyneolson@gmail.com>
2024-04-05 21:15:57 -07:00
Ping Xie
aaec321213
Remove REDISMODULE_ prefixes and introduce compatibility header (#194)
Fix #146 

Removed REDISMODULE_ prefixes from the core source code to align with
the new SERVERMODULE_ naming convention. Added a new 'redismodule.h'
header file to ensure full backward compatibility with existing modules.
This compatibility layer maps all legacy REDISMODULE_ prefixed
identifiers to their new SERVERMODULE_ equivalents, allowing existing
Redis modules to function without modification.

---------

Signed-off-by: Ping Xie <pingxie@google.com>
2024-04-05 16:59:55 -07:00
Shivshankar
906c8e8f90
delete cluster fail time script (#237) 2024-04-05 14:50:42 -07:00
Wen Hui
7f5bcc96f0
Update some valkey-cli related in tcl (#236)
Signed-off-by: hwware <wen.hui.ware@gmail.com>
2024-04-05 16:46:33 -04:00
Siddhartha Sankar Mondal
47444c67de
Update Makefile comments to relect name change (#106)
Update the comments in the Makefile to reflect the new names.

Signed-off-by: Siddhartha Mondal <siddharthmondal@gmail.com>
2024-04-05 13:54:28 -04:00
Wen Hui
490f4ebb65
Update runtest test name and test filename (#214)
Update runtest test name and test filename

Signed-off-by: hwware <wen.hui.ware@gmail.com>
2024-04-04 18:41:45 -07:00
Wen Hui
bb1a3fffe7
Fix CI break issue due to serverTests merged issue (#218)
Here is the latest CI run result for this PR

https://github.com/hwware/placeholderkv/actions/runs/8561152261

Signed-off-by: hwware <wen.hui.ware@gmail.com>
2024-04-04 17:37:15 -04:00
Viktor Söderqvist
4646d0825e
Redis in HELP commands (#216)
Removes the word Redis in the output of COMMAND HELP and DEBUG HELP.

---------

Signed-off-by: Viktor Söderqvist <viktor.soderqvist@est.tech>
2024-04-04 23:18:37 +02:00
Wen Hui
29621bc356
Update Valkey keyword in sentinel.conf (#171)
Mostly comments, but one pre-filled config in this template config file
is changed:

    pidfile /var/run/valkey-sentinel.pid

---------

Signed-off-by: hwware <wen.hui.ware@gmail.com>
2024-04-04 20:54:49 +02:00
Wen Hui
a0b09763d0
Update remaning redis to valkey in TLS.md (#201)
Updated TLS.md to remove references to Redis and replace them with Valkey.

Signed-off-by: hwware <wen.hui.ware@gmail.com>
2024-04-04 09:40:04 -07:00
0del
6ea6a693e2
Rename 'redis' to 'server' functions missing (#203)
related: https://github.com/valkey-io/valkey/issues/144

---------

Signed-off-by: 0del <bany.y0599@gmail.com>
2024-04-04 18:21:11 +02:00
Viktor Söderqvist
48184ae2db
In CONTIBUTING.md, mention how to link PR to issue (#197)
This little suggestion can help contributors to link their PRs to
issues. This, in turn, helps the maintainers.

Signed-off-by: Viktor Söderqvist <viktor.soderqvist@est.tech>
2024-04-04 10:42:14 -04:00
Lipeng Zhu
9c5e2bb226
Changes references to redis binaries in output of "--help", "--version" (#113)
Rename output from redis-* to valkey-* for binaries:

1. `valkey-benchmark`
2. `valkey-cli`
3. `valkey-server`
4. `valkey-sentinel`
5. `valkey-check-rdb`
6. `valkey-check-aof`

"--help" "--version" option.

Signed-off-by: Lipeng Zhu <lipeng.zhu@intel.com>
2024-04-04 10:46:17 +02:00
0del
e3e1f9a372
Rename 'redis' to 'server' and redisNodeFlags to clusterNodeFlags (#191)
Rename additional instances of redis to server, as well as redisNodeFlags to clusterNodeFlags.

---------

Signed-off-by: 0del <bany.y0599@gmail.com>
2024-04-03 18:45:23 -07:00
Shivshankar
9a02b775c1
Replace Valkey in runtest scripts error prints (#190)
Replaced Redis with Valkey in runtest script's error prints.

Signed-off-by: Shivshankar-Reddy <shiva.sheri.github@gmail.com>
2024-04-03 16:17:38 -07:00
Madelyn Olson
39d0f457a2
Update versioning fields for compatibility (#47)
New info information to be used to determine the valkey versioning info.

Internally, introduce new define values for "SERVER_VERSION" which is
different from the Redis compatibility version, "REDIS_VERSION".

Add two new info fields:
`server_version`: The Valkey server version
`server_name`: Indicates that the server is valkey.

Add one new RDB field: `server_ver`, which indicates the valkey version
that produced the server.

Add 3 new LUA globals: `SERVER_VERSION_NUM`, `SERVER_VERSION`, and
`SERVER_NAME`. Which reflect the valkey version instead of the Redis
compatibility version.

Also clean up various places where Redis and configuration was being
used that is no longer necessary.

---------

Signed-off-by: Madelyn Olson <madelyneolson@gmail.com>
2024-04-03 14:52:36 -07:00
Daniel House
55de74e0dc
The usage (--help) message now refers to valkey (#189)
Fixing redis -> valkey in the output of valkey-server --help.

Signed-off-by: Daniel House <daniel.house@huawei.com>
Co-authored-by: Daniel House <daniel.house@huawei.com>
2024-04-03 23:23:34 +02:00
Lipeng Zhu
e1cb4c8a8b
Rename #include guards (#167)
Rename include guard macros (redis -> valkey) and remove the leading double underscore.

---------

Signed-off-by: Lipeng Zhu <lipeng.zhu@intel.com>
Signed-off-by: Viktor Söderqvist <viktor.soderqvist@est.tech>
Co-authored-by: Viktor Söderqvist <viktor.soderqvist@est.tech>
2024-04-03 23:20:06 +02:00
Shivshankar
e4d61c4825
Rename cli benchmark check-aof and check-rdb src and object files to valkey respectively (#188)
As part of earlier PRs binary names and some file names renamed to
valkey, but still cli and benchmark and other source files still with redis
name. So changed the file names and makefile accordingly.

Signed-off-by: hwware <wen.hui.ware@gmail.com>
Co-authored-by: hwware <wen.hui.ware@gmail.com>
2024-04-03 23:06:45 +02:00
Shivshankar
f3ccfbb01f
Rename TLS test cert files to valkey (#186)
This PR covers changing the redis.crt and redis.key to valkey certs for
TLS testing.

The files are generated by the gen-test-certs.sh script under tests/tls/.

Also covers comments provided.

Signed-off-by: hwware <wen.hui.ware@gmail.com>
Co-authored-by: hwware <wen.hui.ware@gmail.com>
2024-04-03 23:04:52 +02:00
0del
125a2987af
rename git sha related (#184)
redisGitSHA1 -> serverGitSHA1  
redisGitDirty -> serverGitDirty 
redisBuildId -> serverBuildId 
redisBuildIdRaw -> serverBuildIdRaw 
redisBuildIdString -> serverBuildIdString

#144
#170

Signed-off-by: 0del <bany.y0599@gmail.com>
2024-04-03 20:46:23 +02:00
0del
598b951fb5
rename redisServer to valkeyServer (#183)
https://github.com/valkey-io/valkey/issues/144

Signed-off-by: 0del <bany.y0599@gmail.com>
2024-04-03 20:34:18 +02:00
0del
3a0ba0ad93
rename redisCommandArgType serverCommandArgType (#182)
redisCommandArgType -> serverCommandArgType
redisCommandArg -> serverCommandArg

https://github.com/valkey-io/valkey/issues/144

Signed-off-by: 0del <bany.y0599@gmail.com>
2024-04-03 20:33:38 +02:00
0del
edee864b34
rename redisOp to serverOp (#181)
https://github.com/valkey-io/valkey/issues/144

Signed-off-by: 0del <bany.y0599@gmail.com>
2024-04-03 20:30:30 +02:00
0del
8b3ab8f74f
Rename redisAtomic to serverAtomic (#180)
https://github.com/valkey-io/valkey/issues/144

Signed-off-by: 0del <bany.y0599@gmail.com>
2024-04-03 20:29:33 +02:00
0del
f753db5141
rename redis functions in server.h (#179)
redisPopcount -> serverPopcount
redisSetProcTitle -> serverSetProcTitle
redisCommunicateSystemd -> serverCommunicateSystemd
redisSetCpuAffinity -> serverSetCpuAffinity
redisFork -> serverFork

#144

Signed-off-by: 0del <bany.y0599@gmail.com>
2024-04-03 20:26:33 +02:00
0del
add5f5615c
Rename some redis structs to server (#178)
- redisFunctionSym -> serverFunctionSym
- redisSortObject -> serverSortObject
- redisSortOperation -> serverSortOperation

#144

Signed-off-by: 0del <bany.y0599@gmail.com>
2024-04-03 20:24:01 +02:00
Harkrishn Patro
1736018aa9
Remove trademarked wording on configuration file and individual configs (#29)
Remove trademarked wording on configuration layer.

Following changes for release notes:

1. Rename redis.conf to valkey.conf
2. Pre-filled config in the template config file: Changing pidfile to `/var/run/valkey_6379.pid`

Signed-off-by: Harkrishn Patro <harkrisp@amazon.com>
2024-04-03 19:47:26 +02:00
0del
1629e28f86
Rename redisError to serverError (#177)
Part of #144

Signed-off-by: 0del <bany.y0599@gmail.com>
2024-04-03 19:12:34 +02:00
0del
c413834da1
Rename redisTLSContextConfig to serverTLSContextConfig (#176)
Part of #144

Signed-off-by: 0del <bany.y0599@gmail.com>
2024-04-03 19:06:01 +02:00
0del
25122b140e
Rename redisObject to serverObject (#175)
Part of #144

Signed-off-by: 0del <bany.y0599@gmail.com>
2024-04-03 19:04:51 +02:00
0del
b19ebaf551
Rename redisCommand to serverCommand (#174)
Part of #144

---------

Signed-off-by: 0del <bany.y0599@gmail.com>
2024-04-03 18:54:33 +02:00
0del
a236fc8ef0
Rename redisCommandProc, redisGetKeysProc to server prefix (#173)
Part of #144

Signed-off-by: 0del <bany.y0599@gmail.com>
2024-04-03 18:33:33 +02:00
0del
99bdcc0ed0
Rename redisCommandGroup to serverCommandGroup (#172)
Part of issue #144

Signed-off-by: 0del <bany.y0599@gmail.com>
2024-04-03 18:29:59 +02:00
0del
def09488aa
Rename redis_member2struct ro server_member2struct (#166)
part of #144

Signed-off-by: 0del <bany.y0599@gmail.com>
2024-04-03 17:07:28 +08:00
Jun Luo
69d28be0f1
Rename redis to valkey in create-cluster script (#165)
Otherwise currently create-cluster will not work (because there is no redis-*).

Signed-off-by: Jun Luo <luojunmoo@gmail.com>
2024-04-03 16:39:16 +08:00
0del
730174445b
Rename redisOpArray to serverOpArray (#157)
A task of #144

Signed-off-by: 0del <bany.y0599@gmail.com>
2024-04-03 12:26:20 +08:00
Vitah Lin
cbbaf69d1d
Remove unused REDIS_TEST_MAIN dead code in crc64.c (#160)
We use `#ifdef SERVER_TEST` to run the relavent tests, we can now remove
the dead code `#ifdef REDIS_TEST_MAIN`.

Signed-off-by: Vitah Lin <vitahlin@gmail.com>
2024-04-03 12:24:55 +08:00
0del
717dfe8022
Rename redisDb to serverDb (#156)
A task of #144.

Signed-off-by: 0del <bany.y0599@gmail.com>
2024-04-03 11:02:43 +08:00
0del
98892bb5c3
Rename redisMemOverhead to serverMemOverhead (#159)
Part of #144.

Signed-off-by: 0del <bany.y0599@gmail.com>
2024-04-03 10:29:42 +08:00
Gabi Ganam
7a7288b292
Log unused module configuration entries that cause redis to abort (#132)
Log unused module configuration entries that cause redis to abort
on startup.

Example:
```
17797:M 31 Mar 2024 12:26:12.146 # Unused Module Configuration: module1.whatever
17797:M 31 Mar 2024 12:26:12.146 # Unused Module Configuration: module2.test
17797:M 31 Mar 2024 12:26:12.146 # Module Configuration detected without loadmodule directive or no ApplyConfig call: aborting
```

Signed-off-by: Gabi Ganam <ggabi@amazon.com>
2024-04-02 16:03:31 -07:00