Commit Graph

12284 Commits

Author SHA1 Message Date
bentotten
6975242529
Update comment in cluster_legacy.h (#277)
Update comment suggesting clusterMsgPingExtTypes to clusterMsgPingtypes
as clusterMsgPingExtTypes does not exist

Signed-off-by: Ben Totten <btotten@amazon.com>
2024-04-11 13:18:20 -07:00
Daniel House
f0113a4105
Clarify the usage of Valkey in a comment (#233)
Signed-off-by: Daniel House <daniel.house@huawei.com>
2024-04-11 13:06:04 -07:00
Roshan Khatri
f4f1bd6fde
Revert update of RedisModuleEvent_MasterLinkChange (#289)
ValkeyModuleEvent_MasterLinkChange was updated to use more inclusive
language, but it was done in the compatibility layer as well
(RedisModuleEvent_).

---------

Signed-off-by: Roshan Khatri <rvkhatri@amazon.com>
2024-04-10 17:35:08 -07:00
Daniel House
b669af0eab
Rename 'redis_tls_ctx' and 'redis_tls_client_ctx' global variables (#268)
Signed-off-by: Daniel House <daniel.house@huawei.com>
Signed-off-by: daniel-house <danny@cs.toronto.edu>
Co-authored-by: Daniel House <daniel.house@huawei.com>
2024-04-10 23:00:27 +02:00
Shivshankar
2e46046625
Rename macros in valkey-cli.c and redis_strlcpy to valkey (#284)
Signed-off-by: Shivshankar-Reddy <shiva.sheri.github@gmail.com>
2024-04-10 22:50:52 +02:00
Viktor Söderqvist
f8cec23a9b
Delete old deprecated cli program redis-trib (#281)
Actually, this script doesn't do anything except printing that it is
replaced by redis-cli.

Signed-off-by: Viktor Söderqvist <viktor.soderqvist@est.tech>
2024-04-10 18:14:58 +02:00
Shivshankar
a054862b72
Rename redis_client* procedure to valkey_client* in test environment (#276)
Renamed redis-client* procedure to valkey_client*

Signed-off-by: Shivshankar-Reddy <shiva.sheri.github@gmail.com>
2024-04-10 10:18:47 -04:00
Shivshankar
05d16579e6
Rename redis in valkey-cli file comments and prints (#222)
Updated to Valkey in valkey-cli.c file's comments and prints.

* The output of valkey-cli --help
* The output of the cli built-in HELP command
* The prompt in interactive valkey-cli -s unixsocket
* The history file and the default rc file (changed filename)

---------

Signed-off-by: Shivshankar-Reddy <shiva.sheri.github@gmail.com>
2024-04-10 11:03:08 +02:00
Vitah Lin
4a8b4f4229
Rename redis.info to valkey.info in LCOV (#259)
Signed-off-by: Vitah Lin <vitahlin@gmail.com>
2024-04-10 08:59:45 +02:00
Madelyn Olson
03650e91b7
Revert the default PID file back to the real default (#275)
The default pid file is created at /var/run/redis.pid based on the code
at
da831c0d22/src/server.h (L132).
Until we update it, we should reflect that in the conf file.

Signed-off-by: Madelyn Olson <madelyneolson@gmail.com>
2024-04-09 08:21:06 -07:00
Shivshankar
da831c0d22
rename procedure redis_deferring_client to valkey_deferring_client (#270)
Updated procedure redis_deferring_client in test environent to
valkey_deferring_client.

Signed-off-by: Shivshankar-Reddy <shiva.sheri.github@gmail.com>
2024-04-09 10:38:09 -04:00
Madelyn Olson
c0cef48e98
Fix reference to redis-tls module (#273)
Update test usage of valkey-tls.so module to use valkey-tls.so instead.

Fixes tests failures like
https://github.com/valkey-io/valkey/actions/runs/8592855995/job/23543475478.

Signed-off-by: Madelyn Olson <madelyneolson@gmail.com>
2024-04-09 07:15:59 -07:00
Jacob Murphy
df5db0627f
Remove trademarked language in code comments (#223)
This includes comments used for module API documentation.

* Strategy for replacement: Regex search: `(//|/\*| \*|#).* ("|\()?(r|R)edis( |\.
  |'|\n|,|-|\)|")(?!nor the names of its contributors)(?!Ltd.)(?!Labs)(?!Contributors.)`
* Don't edit copyright comments
* Replace "Redis version X.X" -> "Redis OSS version X.X" to distinguish
from newly licensed repository
* Replace "Redis Object" -> "Object"
* Exclude markdown for now
* Don't edit Lua scripting comments referring to redis.X API
* Replace "Redis Protocol" -> "RESP"
* Replace redis-benchmark, -cli, -server, -check-aof/rdb with "valkey-"
prefix
* Most other places, I use best judgement to either remove "Redis", or
replace with "the server" or "server"

Fixes #148

---------

Signed-off-by: Jacob Murphy <jkmurphy@google.com>
Signed-off-by: Viktor Söderqvist <viktor.soderqvist@est.tech>
2024-04-09 10:24:03 +02:00
Harkrishn Patro
1aa13decf6
Remove single node cluster validation check from benchmark (#266)
Allow redis-benchmark to run against single shard clusters. 

Signed-off-by: Harkrishn Patro <harkrisp@amazon.com>
2024-04-08 21:20:10 -07:00
VoletiRam
d89ef06ce5
Wait for cluster fully online in cluster_config_consistent (#272)
Wait for cluster to be in a fully consistent and online state in
`cluster_config_consistent`. We expect the `start_server` to create the
desired primaries and replicas before the start of the tests. With the
current setup, the replicas may not complete the sync with primaries and
can be in loading state. In some cases, the role of replicas can still
be master with the delay of propagation of replicate command. The tests
can show flaky behavior in such cases. Add a check that verifies the
nodes health status 'online' for the cluster consistency. Leverage the
deterministic order of `CLUSTER SLOTS` to consider the cluster as
consistent along with the nodes health status.

---------

Signed-off-by: Harkrishn Patro <harkrisp@amazon.com>
Signed-off-by: Ram Prasad Voleti <ramvolet@amazon.com>
Co-authored-by: Harkrishn Patro <harkrisp@amazon.com>
Co-authored-by: Ram Prasad Voleti <ramvolet@amazon.com>
2024-04-08 20:03:56 -07:00
Harkrishn Patro
e59dd41e42
Maintain determinstic ordering of replica(s) in CLUSTER SLOTS response (#265)
Sort `clusterNode.slaves` while adding a new replica to the cluster on
basis of `name`. This will enable deterministic ordering of replica(s)
information in `CLUSTER SLOTS` response.

Before this change:

```
127.0.0.1:6380> CLUSTER SLOTS
1) 1) (integer) 0
   2) (integer) 16383
   3) 1) "127.0.0.1"
      2) (integer) 6379
      3) "fc72609a620c62d073a31eed9ddde5104c1fa302"
      4) (empty array)
   4) 1) "127.0.0.1"
      2) (integer) 6381
      3) "fac84bbf2ffc5cfcdebc92c06b8ead9c3cba4051"
      4) (empty array)
   5) 1) "127.0.0.1"
      2) (integer) 6380
      3) "b1249d394326f1485df0b895f2fd38e141aa5056"
      4) (empty array)
```

After this change:

```
127.0.0.1:6380> CLUSTER SLOTS
1) 1) (integer) 0
   2) (integer) 16383
   3) 1) "127.0.0.1"
      2) (integer) 6379
      3) "fc72609a620c62d073a31eed9ddde5104c1fa302"
      4) (empty array)
   4) 1) "127.0.0.1"
      2) (integer) 6380
      3) "b1249d394326f1485df0b895f2fd38e141aa5056"
      4) (empty array)
   5) 1) "127.0.0.1"
      2) (integer) 6381
      3) "fac84bbf2ffc5cfcdebc92c06b8ead9c3cba4051"
      4) (empty array)
```

Signed-off-by: Harkrishn Patro <harkrisp@amazon.com>
2024-04-08 19:58:23 -07:00
Harkrishn Patro
c2ebe9ebbd
Add sharded-pubsub tcl test to test_helper all test set (#267)
Add sharded-pubsub to the supported TCL tests.

Signed-off-by: Harkrishn Patro <harkrisp@amazon.com>
2024-04-08 17:18:45 -07:00
Shivshankar
5bccd7b800
Rename systemd files and content to valkey from redis (#234)
Changed systemd file names and content of them to valkey.

Signed-off-by: Shivshankar-Reddy <shiva.sheri.github@gmail.com>
2024-04-08 14:37:56 -04:00
Madelyn Olson
750e94cad3
Update crash wording to include our repo (#263)
Update the wording in the crash log to point to Valkey repo instead of Redis repo.

Signed-off-by: Madelyn Olson <madelyneolson@gmail.com>
2024-04-08 10:09:27 -07:00
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