12487 Commits

Author SHA1 Message Date
artikell
dcc9fd4fe8
Resolve numtests counter error (#514)
When supporting test, a type error was found

Signed-off-by: artikell <739609084@qq.com>
2024-05-19 10:48:28 -07:00
Viktor Söderqvist
efa8ba519b
Finish postponed SCAN changes (#501)
Commit 07ed0eafa98a66 introduced some SCAN improvements, but some
changes were postponed to a later version (8.0), which this PR finishes:

1. Prepare to move the TYPE filtering to the scan callback as well. this
was put on hold since it has side effects that can be considered a
breaking change, which is that we will not attempt to do lazy expire
(delete) a key that was filtered by not matching the TYPE (changing it
would mean TYPE filter starts behaving the same as MATCH filter already
does in that respect).
2. when the specified key TYPE filter is an unknown type, server will
reply a error immediately instead of doing a full scan that comes back
empty handed.

Fixes #235

Release notes:

> SCAN: Expired keys that don't match the TYPE argument for the SCAN are
no longer deleted by SCAN

Signed-off-by: Viktor Söderqvist <viktor.soderqvist@est.tech>
2024-05-17 13:35:31 +02:00
Madelyn Olson
9b6232b501
Automatically notify the slack channel when tests fail (#509)
Adds a job that will automatically run at the end of the daily, which
will collect all the failed tests and send them to the developer slack.
It will include a link to the job as well.

Example job that ran on my private repo:
https://github.com/madolson/valkey/actions/runs/9123245899/job/25085418567

Example notification: 
<img width="662" alt="image"
src="https://github.com/valkey-io/valkey/assets/34459052/69127db4-e416-4321-bc06-eefcecab1130">
(Note: I removed the sassy text at the bottom from the PR)

Signed-off-by: Madelyn Olson <madelyneolson@gmail.com>
2024-05-16 23:51:33 -07:00
Ping Xie
fd53f17a61
Use pause_process to stop a node to make Valgrind happy, hopefully (#508)
Signed-off-by: Ping Xie <pingxie@google.com>
2024-05-16 22:59:00 -07:00
Lipeng Zhu
7a9951fb80
Correct the actual allocated size from allocator when call sdsRedize to align the logic with sdsnewlen function. (#476)
This patch try to correct the actual allocated size from allocator
when call sdsRedize to align the logic with sdsnewlen function.

Maybe the https://github.com/valkey-io/valkey/pull/453 optimization
should depend on this.

Signed-off-by: Lipeng Zhu <lipeng.zhu@intel.com>
2024-05-15 18:22:50 -07:00
Arthur Lee
3de5c71f48
[Feat] Support fast fail option for tcl test cases (#482)
This PR added a new option for tcl test case which will fail fast once any test cases fail.
This can be useful while running redis CI pipeline, and you want to accelerate the CI pipeline.

usage for example

> ./runtest --single unit/type/hash --fast-fail

---------

Signed-off-by: arthur.lee <arthur-lee@qq.com>
2024-05-15 06:55:24 -07:00
Madelyn Olson
6e4a61093e
Make it to so that unit tests build on mac (#499)
The test logic is not smart enough to realize that a test is fully
#ifdef'd out, so it will try to attach it to the test suite anyways.
This is a minor work around for the reclaim file page test so that it
will still attach the test, it will just always succeed. Also remove an
unnecessary print statement that was missed in the same test.

Signed-off-by: Madelyn Olson <madelyneolson@gmail.com>
2024-05-15 14:48:30 +08:00
Madelyn Olson
546cef6684
Initial cleanup for cluster refactoring (#460)
Cleaned up the minor cluster refactoring notes that were intended to be
follow ups that never happened. Basically:
1. Minor style nitpicks
2. Generalized clusterNodeIsMyself so that it wasn't implementation
dependent.
3. Removed getMyClusterId, and just make it an explicit call to myself's
name, which seems more straightforward and removes unnecessary
abstraction.
4. Remove clusterNodeGetSlaveof infavor of clusterNodeGetMaster. We
already do a check if it's a replica, and if it wasn't working it would
have been crashing.

Signed-off-by: Madelyn Olson <madelyneolson@gmail.com>
2024-05-14 17:09:49 -07:00
Karthick Ariyaratnam
741ee702ca
[New] Migrate zmalloc.c unit tests to new test framework. (#493)
This is the actual PR which is created to migrate all tests related to
zmalloc into new test framework as part of the parent issue
https://github.com/valkey-io/valkey/issues/428.

Signed-off-by: Karthick Ariyaratnam <karthyuom@gmail.com>
2024-05-14 15:54:33 -07:00
Viktor Söderqvist
72f2a8743c
Minor fix in module API doc script (#494)
The script extracts the comments and prototypes from module.c and does
some pre-processing, e.g. converts URLs to markdown links. The URL
regexp didn't account for '#', '?' (and a few more chars) so an URL like
`https://example.com/#section` was converted to markdown as

    [https://example.com/](https://example.com/)#section

With this change, it's instead correctly converted to

    [https://example.com/#section](https://example.com/#section)

Additional change: Removes an unused metadata field.

Signed-off-by: Viktor Söderqvist <viktor.soderqvist@est.tech>
2024-05-14 01:12:30 +02:00
Madelyn Olson
4e18e326a1
Remove endian coverage from server.c (#492)
In c7ad9feb52,
we missed removed endian coverage from the legacy unit tests, so it failed to find it when building.

Signed-off-by: Madelyn Olson <madelyneolson@gmail.com>
2024-05-13 11:02:41 +08:00
Karthick Ariyaratnam
c7ad9feb52
Migrate endianconv.c unit tests to new test framework (#458)
This PR migrates all tests related to endianconv into new test framework
as part of the parent issue https://github.com/valkey-io/valkey/issues/428.

---------

Signed-off-by: Karthick Ariyaratnam <karthyuom@gmail.com>
Signed-off-by: Madelyn Olson <madelyneolson@gmail.com>
Co-authored-by: Madelyn Olson <madelyneolson@gmail.com>
2024-05-12 16:58:50 -07:00
Andy Pan
dca1722340
Use kqueue as the backend of AE on DragonFlyBSD (#450)
Currently, we use select(2) on DragonFlyBSD while
`kqueue` is available on DragonFlyBSD since FreeBSD 4.1
and DragonFlyBSD was originally forked from FreeBSD 4.8

`select(2)` is a pretty old technique that has many defects
compared to `kqueue`, we should switch to `kqueue` on DragonFlyBSD.

Signed-off-by: Andy Pan <i@andypan.me>
2024-05-12 16:29:00 -07:00
Ping Xie
ac47ca2d47
Suppress ASAN errors on tests that intentially crash the server via crash-memcheck-enabled no (#489)
Fix daily CI run errors like
https://github.com/valkey-io/valkey/actions/runs/9039450198/job/24842308071#step:6:4176

Signed-off-by: Ping Xie <pingxie@google.com>
2024-05-12 16:08:47 -07:00
Shivshankar
07367df981
Update rdb and module's child proc name to valkey accordingly (compatible with redis symlink) (#454)
If `valkey-server` was started with the `redis-server` symlink, the old
proc names are used, for backwards compatibility.

---------

Signed-off-by: Shivshankar-Reddy <shiva.sheri.github@gmail.com>
2024-05-10 21:51:01 +02:00
Shivshankar
e242799867
Migrate sha1 unit test to new framework (#470)
This migrates unit tests related to sha1 to new framework, ref: #428.

---------

Signed-off-by: Shivshankar-Reddy <shiva.sheri.github@gmail.com>
Signed-off-by: Madelyn Olson <madelyneolson@gmail.com>
Co-authored-by: Madelyn Olson <madelyneolson@gmail.com>
2024-05-09 19:44:40 -07:00
Ping Xie
138a7d9846
Handle role change error in cluster setslot when migrating the last slot away with allow-replica-migration enabled (#466) 2024-05-09 18:12:55 -07:00
Andy Pan
8048abb2fd
Support pipe2() on *BSD (#462)
Before this PR, `pipe2()` is only enabled on Linux and FreeBSD while
`pipe2()` is available on *BSD.

This PR enables `pipe2()` for the rest of *BSD: DragonFlyBSD, NetBSD and
OpenBSD.

## References

- [pipe2 on
DraonFlyBSD](https://man.dragonflybsd.org/?command=pipe&section=2)
- [__DragonFly_version for
pipe2](7485684fa5/sys/sys/param.h (L121))
- [pipe2 on  NetBSD](https://man.netbsd.org/pipe.2)
- [pipe2 on OpenBSD](https://man.openbsd.org/pipe.2)

Signed-off-by: Andy Pan <i@andypan.me>
2024-05-10 02:30:39 +02:00
Lipeng Zhu
0342a81b7c
Migrate sds.c unit tests to new test framework. (#478)
This patch migrates all tests in sds.c into new test framework as part
of the parent issue https://github.com/valkey-io/valkey/issues/428.

---------

Signed-off-by: Lipeng Zhu <lipeng.zhu@intel.com>
Signed-off-by: Madelyn Olson <madelyneolson@gmail.com>
Co-authored-by: Madelyn Olson <madelyneolson@gmail.com>
2024-05-09 14:54:39 -07:00
Arthur Lee
4e1d8e1721
[Fix] move deps from slowlog.c into slowlog.h (#465)
Move dependency from `slowlog.c` into `slowlog.h`, make sure the
language server can work properly under `slowlog.h`

Signed-off-by: arthur.lee <arthur-lee@qq.com>
2024-05-09 14:29:18 -07:00
Arthur Lee
2559f64f5a
[FIX] Remove redundant statement and return (#481)
* `freeClientArgv` was previously defined in `server.h`
* remove the redundant return

Signed-off-by: arthur.lee <arthur-lee@qq.com>
2024-05-09 14:26:45 -07:00
Karthick Ariyaratnam
b166980c8e
Fix UNUSED repetition issue in test sources (#475)
This is a follow-up PR to address UNUSED repetition issue (see
https://github.com/valkey-io/valkey/pull/446#discussion_r1593204956) in
different test source files.

Signed-off-by: Karthick Ariyaratnam <karthyuom@gmail.com>
2024-05-09 14:26:15 -07:00
Binbin
fdd023ff82
Migrate cluster mode tests to normal framework (#442)
We currently has two disjoint TCL frameworks:
1. Normal testing framework, which trigger by runtest, which individually
launches nodes for testing.
2. Cluster framework, which trigger by runtest-cluster, which pre-allocates
N nodes and uses them for testing large configurations.

The normal TCL testing framework is much more readily tested and is also
automatically run as part of the CI for new PRs. The runtest-cluster since
it runs very slowly (cannot be parallelized), it currently only runs in daily
CI, this results in some changes to the cluster not being exposed in PR CI
in time.

This PR migrate the Cluster mode tests to normal framework. Some cluster
tests are kept in runtest-cluster because of timing issues or not yet
supported, we can process them later.

Signed-off-by: Binbin <binloveplay1314@qq.com>
2024-05-09 10:14:47 +08:00
Shivshankar
6cff0d6a7b
Remove intsettest declaration from intset.h (#471)
All the intset unit tests are migrated to new test framework as part of
https://github.com/valkey-io/valkey/pull/344, but the old framework
declaration is missed to remove from intset.h. So removed the code.

Signed-off-by: Shivshankar-Reddy <shiva.sheri.github@gmail.com>
2024-05-08 12:38:50 -07:00
Shivshankar
1125bdbb80
Update serverpanic output based on 'extended-redis-compatibility' config. (#415)
Updated serverPanic output in db.c based on the
extended-redis-compatibility config. and also updated comments in other
files.

---------

Signed-off-by: Shivshankar-Reddy <shiva.sheri.github@gmail.com>
2024-05-08 12:17:32 -07:00
Viktor Söderqvist
6af51f5092
Prevent clang-format in certain places (#468)
This is a preparation for adding clang-format.

These comments prevent automatic formatting in some places. With these
exceptions, we will be able to run clang-format on the rest of the code.

This is a preparation for #323.

---------

Signed-off-by: Viktor Söderqvist <viktor.soderqvist@est.tech>
2024-05-08 20:58:53 +02:00
Shivshankar
2278dfd253
Fix build error for unit test (#473)
Fix the compile error with the following command:
`make all-with-unit-tests SERVER_CFLAGS='-Werror -DSERVER_TEST'
`

```
/usr/bin/ld: /home/ubuntu/valkey-shiv-repo/valkey/src/eval.c:1172: undefined reference to `lua_next'
/usr/bin/ld: /home/ubuntu/valkey-shiv-repo/valkey/src/eval.c:1154: undefined reference to `lua_toboolean'
/usr/bin/ld: /home/ubuntu/valkey-shiv-repo/valkey/src/eval.c:1175: undefined reference to `lua_type'
/usr/bin/ld: /home/ubuntu/valkey-shiv-repo/valkey/src/eval.c:1176: undefined reference to `lua_tonumber'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:469: valkey-unit-tests] Error 1
make[1]: Leaving directory '/home/ubuntu/valkey-shiv-repo/valkey/src'
make: *** [Makefile:6: all-with-unit-tests] Error 2
```

Issue is happened as all deps libraries not linked for
valkey-unit-tests, so linked all libraries to the binary.

Signed-off-by: Shivshankar-Reddy <shiva.sheri.github@gmail.com>
2024-05-08 14:52:21 -04:00
Shivshankar
315b7573c4
Update server function's name to valkey (#456)
Updated valkey in follwing functions.

genRedisInfoString -> genValkeyInfoString
genRedisInfoStringCommandStats -> genValkeyInfoStringCommandStats
genRedisInfoStringACLStats -> genValkeyInfoStringACLStats
genRedisInfoStringLatencyStats -> genValkeyInfoStringLatencyStats

Signed-off-by: Shivshankar-Reddy <shiva.sheri.github@gmail.com>
2024-05-08 09:44:05 -04:00
Karthick Ariyaratnam
4e944cedee
Migrate kvstore.c unit tests to new test framework. (#446)
This PR migrates all tests related to kvstore into new test framework as
part of the parent issue https://github.com/valkey-io/valkey/issues/428.

---------

Signed-off-by: Karthick Ariyaratnam <karthyuom@gmail.com>
Signed-off-by: Madelyn Olson <madelyneolson@gmail.com>
Co-authored-by: Madelyn Olson <madelyneolson@gmail.com>
2024-05-07 16:49:24 -07:00
Shivshankar
1aca85e3de
Update module api and variable to valkey accordingly. (#455)
Updated redis instances accordingly as follows.
rediscmd -> serverCmd
freeRedisModuleAsyncRMCallPromise -> freeValkeyModuleAsyncRMCallPromise
MyCommand_RedisCommand -> MyCommand_ValkeyCommand
RedisModuleString -> ValkeyModuleString
flushRedisModuleIOBuffer -> flushValkeyModuleIOBuffer

Signed-off-by: Shivshankar-Reddy <shiva.sheri.github@gmail.com>
2024-05-07 16:29:46 -07:00
Karthick Ariyaratnam
2ed71de8e1
Migrate util.c unit tests to new test framework (#448)
This PR migrates all tests related to util into new test framework as
part of the parent issue https://github.com/valkey-io/valkey/issues/428.

---------

Signed-off-by: Karthick Ariyaratnam <karthyuom@gmail.com>
2024-05-07 16:21:23 -07:00
Andy Pan
cde8ec1b41
Don't try to set SO_REUSEADDR on sockets of AF_UNIX (#451)
Despite the fact that SO_REUSEADDR can be set on a Unix domain socket
via setsockopt() without reporting an error, SO_REUSEADDR was actually
created for ipv4/ipv6 and it's not supported for sockets of AF_UNIX.

Therefore, setting this option on a Unix domain socket does nothing but
costs one extra system call.

Signed-off-by: Andy Pan <i@andypan.me>
2024-05-07 19:25:26 +02:00
Chen Tianjie
ba9dd7b23a
Add noscores option to command ZSCAN. (#324)
Command syntax is now:
```
ZSCAN key cursor [MATCH pattern] [COUNT count] [NOSCORES]
```
Return format:
```
127.0.0.1:6379> zadd z 1 a 2 b 3 c
(integer) 3
127.0.0.1:6379> zscan z 0
1) "0"
2) 1) "a"
   2) "1"
   3) "b"
   4) "2"
   5) "c"
   6) "3"
127.0.0.1:6379> zscan z 0 noscores
1) "0"
2) 1) "a"
   2) "b"
   3) "c"
```
when NOSCORES is on, the command will only return members in the zset,
without scores.

For client side parsing the command return, I believe it is fine as long
as the command is backwards compatible. The return structure are still
lists, what has changed is the content. And clients can tell the
difference by the subcommand they use.

Since `novalues` option of `HSCAN` is already accepted
(redis/redis#12765), I think similar thing can be done to `ZSCAN`.

---------

Signed-off-by: Chen Tianjie <TJ_Chen@outlook.com>
2024-05-07 14:39:28 +08:00
Ping Xie
6e7af9471c
Slot migration improvement (#445) 2024-05-06 21:40:28 -07:00
Karthick Ariyaratnam
e2aec3b1a2
Fix an error in unit/README (#447)
This PR fixes an error in the unit/READMED.md (see
https://github.com/valkey-io/valkey/issues/428) in order to correct the
steps for running single unit test file.

Signed-off-by: Karthick Ariyaratnam <karthyuom@gmail.com>
2024-05-06 18:34:09 -07:00
NAM UK KIM
93f8a19b6f
Change strlcat function name from redis to valkey (#440)
Updated strlcat function and macros name (redis_strlcat ->
valkey_strlcat).

I think the standard strcat function is not safe.
(https://codeql.github.com/codeql-query-help/cpp/cpp-unsafe-strcat/)
So, it would be better to keep it as a safe function.

Signed-off-by: NAM UK KIM <namuk2004@naver.com>
2024-05-06 00:09:01 -07:00
Madelyn Olson
1b3199e070
Fix unit test issues on address sanitizer and fortify (#437)
This commit does four things:

1. On various images, the linker was not able to correctly load the flto
optimizations from the archive generated for unit tests, and was
throwing errors. I was able to solve this by updating the plugin for the
fortify test, but was unable to reproduce it on the ASAN tests or find a
solution. So I decided to go with a single solution for now, which was
to just disable the linker optimizations for those tests. This shouldn't
weaken the protections provided by ASAN.
2. The change to remove flto for some reason caused some odd inlining
behavior in the intset test, that I wasn't really able to understand.
The error was basically that we were doing a 4 byte write, starting at
byte offset 8, for the first addition to listpack that was of size 10.
Practically this has no effect, since I'm not aware of any allocator
that would give us a 10 byte block as opposed to 12 (or more likely 16)
bytes. The isn't the correct behavior, since an uninitialized listpack
defaults to 16bit encoding, which should only be writing 2 bytes. I
rabbit holed like 2 hours into this, and gave up and just ignored the
warning on the file.
3. Now that address sanitizer was correctly running, it picked up two
issues. A memory leak and uninitialized value, so those were easy to
fix.
4. There is also a small change to the fortify to build the test up
front instead of later, this is just to be consistent with other tests
and has no functional change.

Signed-off-by: Madelyn Olson <madelyneolson@gmail.com>
2024-05-05 22:00:08 -07:00
Chen Tianjie
cc703aa3bc
Input output traffic stats and command process count for each client. (#327)
We already have global stats for input traffic, output traffic and how
many commands have been executed.

However, some users have the difficulty of locating the IP(s) which have
heavy network traffic. So here some stats for single client are
introduced.
```              
tot-net-in   // Total network input bytes read from the client
tot-net-out  // Total network output bytes sent to the client
tot-cmds     // Total commands the client has executed     
```                             
These three stats are shown in `CLIENT LIST` and `CLIENT INFO`.

Though the metrics are handled in hot paths of the code, personally I
don't think it will slow down the server. Considering all other complex
operations handled nearby, this is only a small and simple operation.

However we do need to be cautious when adding more and more metrics, as
discussed in redis/redis#12640, we may need to find a way to tell
whether this has obvious performance degradation.

---------

Signed-off-by: Chen Tianjie <TJ_Chen@outlook.com>
2024-05-05 21:52:59 -07:00
Sergey Fedorov
9ebbd5f038
Fix issues for older versions of Darwin and improve PowerPC support (#436)
Existing code does not build on macOS < 10.7. There are two issues:
1. The check for `MAC_OS_10_6_DETECTED` does the opposite of what it
should, since `AvailabilityMacros.h` does not define underscore-prefixed
versions of macros. `__MAC_OS_X_VERSION_MAX_ALLOWED` evaluates to 0, and
on 10.6 everything breaks down:

Credits to @mohd-akram who pointed out at possible origin of the this
problem.

2. Once that is fixed, on 10.6 when building for `ppc` there are new
errors, because the code uses inaccurate assumptions for archs. Fix that
too.

---------

Signed-off-by: Sergey Fedorov <vital.had@gmail.com>
2024-05-04 12:38:06 -07:00
Björn Svensson
39d4b43d4b
Pin versions of Github Actions in CI (#221)
Pin the Github Action dependencies to the hash according to secure
software development best practices
recommended by the Open Source Security Foundation (OpenSSF).

When developing a CI workflow, it's common to version-pin dependencies
(i.e. actions/checkout@v4). However, version tags are mutable, so a
malicious attacker could overwrite a version tag to point to a malicious
or vulnerable commit instead.
Pinning workflow dependencies by hash ensures the dependency is
immutable and its behavior is guaranteed.
See
https://github.com/ossf/scorecard/blob/main/docs/checks.md#pinned-dependencies

The `dependabot` supports updating a hash and the version comment so its
update will continue to work as before.

Links to used actions and theit tag/hash for review/validation:
https://github.com/actions/checkout/tags    (v4.1.2 was rolled back)
https://github.com/github/codeql-action/tags
https://github.com/maxim-lobanov/setup-xcode/tags
https://github.com/cross-platform-actions/action/releases/tag/v0.22.0
https://github.com/py-actions/py-dependency-install/tags
https://github.com/actions/upload-artifact/tags
https://github.com/actions/setup-node/tags
https://github.com/taiki-e/install-action/releases/tag/v2.32.2

This PR is part of #211.

Signed-off-by: Björn Svensson <bjorn.a.svensson@est.tech>
2024-05-04 01:54:14 +02:00
Viktor Söderqvist
472c1ca26b
Update links in module API docs (generated from module.c) (#433)
These are used in the docs and on the website.

Signed-off-by: Viktor Söderqvist <viktor.soderqvist@est.tech>
2024-05-04 00:14:56 +02:00
Mike Dolan
43692aca7a
Update README.md to add Valkey entity information (#432)
I added details at the end with the Valkey entity information under an
"About Valkey" heading. Please feel free to adjust the heading if that's
not an appropriate one to use.

---------

Signed-off-by: Mike Dolan <mikedolan@gmail.com>
Signed-off-by: Madelyn Olson <madelyneolson@gmail.com>
Co-authored-by: Madelyn Olson <madelyneolson@gmail.com>
2024-05-03 12:12:13 -07:00
pshankinclarke
3b256a5af0
Improve TLS.md configuration instructions (#385)
Signed-off-by: Parker Shankin-Clarke <parkerwsc1@gmail.com>
Co-authored-by: Viktor Söderqvist <viktor.soderqvist@est.tech>
2024-05-03 20:13:10 +02:00
Ted Lyngmo
8f974484ed
Log the real reason for why posix_fadvise failed (#430)
`reclaimFilePageCache` did not set `errno` but `rdbSaveInternal` which
is logging the error assumed it did. This makes sure `errno` is set.

Signed-off-by: Ted Lyngmo <ted@lyncon.se>
2024-05-03 11:10:33 -07:00
Madelyn Olson
5b1fd222ed
An initial simple unit test framework (#344)
The core idea was to take a lot of the stuff from the C unity framework
and adapt it a bit here. Each file in the `unit` directory that starts
with `test_` is automatically assumed to be a test suite. Within each
file, all functions that start with `test_` are assumed to be a test.

See unit/README.md for details about the implementation.

Instead of compiling basically a net new binary, the way the tests are
compiled is that the main valkey server is compiled as a static archive,
which we then compile the individual test files against to create a new
test executable. This is not all that important now, other than it makes
the compilation simpler, but what it will allow us to do is overwrite
functions in the archive to enable mocking for cross compilation unit
functions. There are also ways to enable mocking from within the same
compilation unit, but I don't know how important this is.

Tests are also written in one of two styles:
1. Including the header file and directly calling functions from the
archive.
2. Importing the original file, and then calling the functions. This
second approach is cool because we can call static functions. It won't
mess up the archive either.

---------

Signed-off-by: Madelyn Olson <madelyneolson@gmail.com>
2024-05-02 20:00:04 -07:00
Ikko Eltociear Ashimine
443d80f168
Fix typo in comment in quicklist.h (#416)
Signed-off-by: Ikko Eltociear Ashimine <eltociear@gmail.com>
2024-05-02 17:36:07 +02:00
Viktor Söderqvist
d1de34930a
Document the commands JSON files (#403)
These JSON files were originally not intended to be used directly, since
they contain internals and some fiels like "acl_categories" that are not
the final ACL categories. (Valkey will apply some implicit rules to
compute the final ACL categories.) However, people see JSON files
and use them directly anyway.

So it's better to document them.

In a later PR, we can get rid of all implicit ACL categories and instead
populate them explicitly in the JSON files. Then, we'll add a validation
(e.g. in generate-command-code.py) that the implied categories are set.

---------

Signed-off-by: Viktor Söderqvist <viktor.soderqvist@est.tech>
Co-authored-by: Binbin <binloveplay1314@qq.com>
2024-05-02 17:02:38 +02:00
Rolandas Šimkus
68ca258b0f
Changed links and naming to valkey instead of redis (#389)
This is a minor change where only naming and links now points properly
to valkey.

Fixes #388

---------

Signed-off-by: Rolandas Šimkus <rolandas@simkus.io>
Signed-off-by: simkusr <rolandas.s@wilibox.com>
Signed-off-by: simkusr <rolandas@simkus.io>
Signed-off-by: Viktor Söderqvist <viktor.soderqvist@est.tech>
Co-authored-by: simkusr <rolandas.s@wilibox.com>
Co-authored-by: Viktor Söderqvist <viktor.soderqvist@est.tech>
2024-05-02 14:53:37 +02:00
Shivshankar
8abeb79f52
Rename redis in aof logs and proc title redis-aof-rewrite to valkey-aof-rewrite (#393)
Renamed redis to valkey/server in aof.c serverlogs.

The AOF rewrite child process title is set to "redis-aof-rewrite" if
Valkey was started from a redis-server symlink, otherwise to
"valkey-aof-rewrite".

This is a breaking changes since logs are changed.

Part of #207.

---------

Signed-off-by: Shivshankar-Reddy <shiva.sheri.github@gmail.com>
2024-05-01 18:15:19 +02:00
Josiah Carlson
f4e10eee06
CRC64 perf improvements from Redis patches (#350)
Improve the performance of crc64 for large batches by processing large
number of bytes in parallel and combining the results.

## Performance 
* 53-73% faster on Xeon 2670 v0 @ 2.6ghz
* 2-2.5x faster on Core i3 8130U @ 2.2 ghz
* 1.6-2.46 bytes/cycle on i3 8130U
* likely >2x faster than crcspeed on newer CPUs with more resources than
a 2012-era Xeon 2670
* crc64 combine function runs in <50 nanoseconds typical with vector +
cache optimizations (~8 *microseconds* without vector optimizations, ~80
*microseconds without cache, the combination is extra effective)
* still single-threaded
* valkey-server test crc64 --help (requires `make distclean && make
SERVER_TEST=yes`)

---------

Signed-off-by: Josiah Carlson <josiah.carlson@gmail.com>
Signed-off-by: Madelyn Olson <madelyneolson@gmail.com>
Co-authored-by: Viktor Söderqvist <viktor.soderqvist@est.tech>
Co-authored-by: Madelyn Olson <madelyneolson@gmail.com>
2024-04-30 19:32:01 -07:00