Commit Graph

12555 Commits

Author SHA1 Message Date
Oran Agra d3a0d95dab
Avoid using debug log level in tests that produce many keys (#13942)
CI / test-ubuntu-latest (push) Failing after 31s Details
CI / test-sanitizer-address (push) Failing after 31s Details
CI / build-debian-old (push) Failing after 31s Details
CI / build-32bit (push) Failing after 31s Details
CI / build-libc-malloc (push) Failing after 31s Details
CI / build-centos-jemalloc (push) Failing after 31s Details
CI / build-old-chain-jemalloc (push) Failing after 31s Details
Codecov / code-coverage (push) Failing after 31s Details
Spellcheck / Spellcheck (push) Failing after 31s Details
Coverity Scan / coverity (push) Has been skipped Details
External Server Tests / test-external-standalone (push) Failing after 31s Details
External Server Tests / test-external-cluster (push) Failing after 31s Details
External Server Tests / test-external-nodebug (push) Failing after 32s Details
CI / build-macos-latest (push) Has been cancelled Details
if the test fails, and there are per-key log prints, this can flood the
CI due to --dump-logs
2025-04-14 14:15:50 +03:00
Ozan Tezcan c9be4fbd72
Fix order of KSN for hgetex command (#13931)
If HGETEX command deletes the only field due to lazy expiry, Redis
currently sends `del` KSN (Keyspace Notification) first, followed by
`hexpired` KSN. The order should be reversed, `hexpired` should be sent
first and `del` later.

Additonal changes: More test coverage for HGETDEL KSN

---------

Co-authored-by: hristosko <hristosko.chaushev@redis.com>
2025-04-14 13:31:31 +03:00
debing.sun b33a405bf1
Fix timing issue in lazyfree test (#13926)
This test was introduced by https://github.com/redis/redis/issues/13853
We determine if the client is in blocked status, but if async flushdb is
completed before checking the blocked status, the test will fail.
So modify the test to only determine if `lazyfree_pending_objects` is
correct to ensure that flushdb is async, that is, the client must be
blocked.
2025-04-13 20:32:16 +08:00
chx9 90fa80f372
Delete redundant declaration of clusterNodeIsMaster() (#13937) 2025-04-13 20:30:34 +08:00
Salvatore Sanfilippo 96a0cfdea2
Vectror Sets: build fixes for the w2v test (#13919)
CI / test-ubuntu-latest (push) Failing after 32s Details
CI / build-debian-old (push) Failing after 32s Details
CI / build-32bit (push) Failing after 32s Details
CI / build-libc-malloc (push) Failing after 32s Details
CI / build-centos-jemalloc (push) Failing after 32s Details
CI / build-old-chain-jemalloc (push) Failing after 32s Details
Codecov / code-coverage (push) Failing after 33s Details
CI / test-sanitizer-address (push) Failing after 1m16s Details
Spellcheck / Spellcheck (push) Failing after 32s Details
External Server Tests / test-external-standalone (push) Failing after 31s Details
Coverity Scan / coverity (push) Has been skipped Details
External Server Tests / test-external-cluster (push) Failing after 32s Details
External Server Tests / test-external-nodebug (push) Failing after 32s Details
CI / build-macos-latest (push) Has been cancelled Details
Hi, this fixes building Vector Sets as modules. Right now the module
builds but there are issues with w2v. This PR should fix the problem.
Thanks.
2025-04-09 14:39:33 +03:00
Ozan Tezcan eafc365040
Fix flaky replication test (#13909)
CI / test-ubuntu-latest (push) Failing after 31s Details
CI / test-sanitizer-address (push) Failing after 32s Details
CI / build-debian-old (push) Failing after 31s Details
CI / build-32bit (push) Failing after 31s Details
CI / build-libc-malloc (push) Failing after 31s Details
CI / build-centos-jemalloc (push) Failing after 31s Details
CI / build-old-chain-jemalloc (push) Failing after 32s Details
Codecov / code-coverage (push) Failing after 31s Details
Spellcheck / Spellcheck (push) Failing after 31s Details
Coverity Scan / coverity (push) Has been skipped Details
External Server Tests / test-external-standalone (push) Failing after 32s Details
External Server Tests / test-external-cluster (push) Failing after 32s Details
External Server Tests / test-external-nodebug (push) Failing after 1m56s Details
CI / build-macos-latest (push) Has been cancelled Details
Test fails time to time:
```
*** [err]: Slave is able to detect timeout during handshake in tests/integration/replication.tcl
Replica is not able to detect timeout
```


Depending on the timing, "debug sleep" may occur during rdbchannel
handshake and required log statement won't be printed to the log in that
case. Better to wait after rdbchannel handshake.
2025-04-07 13:12:33 +03:00
Ozan Tezcan ec31156b58
Fix a couple of compiler warnings (#13911)
Fix a couple of compiler warnings

1.  gcc-14 prints a warning:
    ```
    In function ‘memcpy’,
        inlined from ‘zipmapSet’ at zipmap.c:255:5:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:29:10: warning:
‘__builtin_memcpy’ writing between 254 and 4294967295
bytes into a region of size 0 overflows the destination
[-Wstringop-overflow=]
       29 |   return __builtin___memcpy_chk (__dest, __src, __len,
          |          ^
    In function ‘zipmapSet’:
    lto1: note: destination object is likely at address zero
    ```
    
2. I occasionally get another warning while building with different
options:
    ```
   redis-cli.c: In function ‘clusterManagerNodeMasterRandom’:
redis-cli.c:6053:1: warning: control reaches end of non-void function
[-Wreturn-type]
    6053 | }
   ```
2025-04-07 13:09:47 +03:00
YaacovHazan 5582a41bb6
Few fixes around make for modules (#13922)
CI / test-ubuntu-latest (push) Failing after 30s Details
CI / test-sanitizer-address (push) Failing after 31s Details
CI / build-debian-old (push) Failing after 31s Details
CI / build-32bit (push) Failing after 31s Details
CI / build-libc-malloc (push) Failing after 32s Details
CI / build-centos-jemalloc (push) Failing after 49s Details
CI / build-old-chain-jemalloc (push) Failing after 31s Details
Codecov / code-coverage (push) Failing after 31s Details
Spellcheck / Spellcheck (push) Failing after 1m17s Details
Coverity Scan / coverity (push) Has been skipped Details
External Server Tests / test-external-standalone (push) Failing after 31s Details
External Server Tests / test-external-cluster (push) Failing after 32s Details
External Server Tests / test-external-nodebug (push) Failing after 32s Details
CI / build-macos-latest (push) Has been cancelled Details
- Suppress errors when removing .so files that may not exist
- Fix -DINCLUDE_VEC_SETS duplication
2025-04-06 11:09:07 +03:00
Slava Koyfman fd4b5cb3fa
Improve refcount check in 'decrRefCount' (#13888)
CI / test-ubuntu-latest (push) Failing after 31s Details
CI / test-sanitizer-address (push) Failing after 31s Details
CI / build-debian-old (push) Failing after 31s Details
CI / build-32bit (push) Failing after 31s Details
CI / build-libc-malloc (push) Failing after 31s Details
CI / build-centos-jemalloc (push) Failing after 31s Details
CI / build-old-chain-jemalloc (push) Failing after 31s Details
Codecov / code-coverage (push) Failing after 31s Details
Spellcheck / Spellcheck (push) Failing after 31s Details
CI / build-macos-latest (push) Has been cancelled Details
CodeQL / Analyze (cpp) (push) Failing after 31s Details
Coverity Scan / coverity (push) Has been skipped Details
External Server Tests / test-external-cluster (push) Failing after 32s Details
External Server Tests / test-external-nodebug (push) Failing after 32s Details
External Server Tests / test-external-standalone (push) Failing after 1m43s Details
The code of 'decrRefCount' included a validity check that would panic
the server if the refcount ever became invalid. However, due to the way
it was written, this could only happen if a corrupted value was written
to the field, or we attempted to decrement a newly-allocated and
never-incremented object. Incorrectly-tracked refcounts would not be
caught, as the code would never actually reduce the refcount from 1 to
0. This left potential use-after-free errors unhandled.

Improved the code so that incorrect tracking of refcounts causes a
panic, even if the freed memory happens to still be owned by the
application and not re-allocated.
2025-04-03 21:29:06 +08:00
Ozan Tezcan 3cdb8c6046
Improve replication buffering on replica and fix a related bug (#13904)
With RDB channel replication, we introduced parallel replication stream
and RDB delivery to the replica during a full sync. Currently, after the
replica loads the RDB and begins streaming the accumulated buffer to the
database, it does not read from the master connection during this
period. Although streaming the local buffer is generally a fast
operation, it can take some time if the buffer is large. This PR
introduces buffering during the streaming of the local buffer. One
important consideration is ensuring that we consume more than we read
during this operation; otherwise, it could take indefinitely. To
guarantee that it will eventually complete, we limit the read to at most
half of what we consume, e.g. read at most 1 mb once we consume at least
2 mb.

**Additional changes**

**Bug fix**
- Currently, when replica starts draining accumulated buffer, we call
protectClient() for the master client as we occasionally yield back to
event loop via processEventsWhileBlocked(). So, it prevents freeing the
master client. While we are in this loop, if replica receives "replicaof
newmaster" command, we call replicaSetMaster() which expects to free the
master client and trigger a new connection attempt. As the client object
is protected, its destruction will happen asynchronously. Though, a new
connection attempt to new master will be made immediately. Later, when
the replication buffer is drained, we realize master client was marked
as CLOSE_ASAP, and freeing master client triggers another connection
attempt to the new master. In most cases, we realize something is wrong
in the replication state machine and abort the second attempt later. So,
the bug may go undetected. Fix is not calling protectClient() for the
master client. Instead, trying to detect if master client is
disconnected during processEventsWhileBlocked() and if so, breaking the
loop immediately.

**Related improvement:** 
- Currently, the replication buffer is a linked list of buffers, each of
which is 1 MB in size. While consuming the buffer, we process one buffer
at a time and check if we need to yield back to
`processEventsWhileBlocked()`. However, if
`loading-process-events-interval-bytes` is set to less than 1 MB, this
approach doesn't handle it well. To improve this, I've modified the code
to process 16KB at a time and check
`loading-process-events-interval-bytes` more frequently. This way,
depending on the configuration, we may yield back to networking more
often.

- In replication.c, `disklessLoadingRio` will be set before a call to
`emptyData()`. This change should not introduce any behavioral change
but it is logically more correct as emptyData() may yield to networking
and we may need to call rioAbort() on disklessLoadingRio. Otherwise,
failure of main channel may go undetected until a failure on rdb channel
on a corner case.

**Config changes**
- The default value for the `loading-process-events-interval-bytes`
configuration is being lowered from 2MB to 512KB. This configuration
primarily used for testing and controls the frequency of networking
during the loading phase, specifically when loading the RDB or applying
accumulated buffers during a full sync on the replica side.

Before the introduction of RDB channel replication, the 2MB value was
sufficient for occasionally yielding to networking, mainly to reply
-loading to the clients. However, with RDB channel replication, during a
full sync on the replica side (either while loading the RDB or applying
the accumulated buffer), we need to yield back to networking more
frequently to continue accumulating the replication stream. If this
doesn’t happen often enough, the replication stream can accumulate on
the master side, which is undesirable.
  
To address this, we’ve decided to lower the default value to 512KB. One
concern with frequent yielding to networking is the potential
performance impact, as each call to processEventsWhileBlocked() involves
4 syscalls, which could slow down the RDB loading phase. However,
benchmarking with various configuration values has shown that using
512KB or higher does not negatively impact RDB loading performance.
Based on these results, 512KB is now selected as the default value.

**Test changes**
- Added improved version of a replication test which checks memory usage
on master during full sync.

---------

Co-authored-by: Oran Agra <oran@redislabs.com>
2025-04-03 10:04:29 +03:00
YaacovHazan 5e7333d2dd
Add vector-sets module (#13915)
CI / test-ubuntu-latest (push) Failing after 31s Details
CI / test-sanitizer-address (push) Failing after 31s Details
CI / build-debian-old (push) Failing after 31s Details
CI / build-32bit (push) Failing after 31s Details
CI / build-libc-malloc (push) Failing after 31s Details
CI / build-centos-jemalloc (push) Failing after 31s Details
CI / build-old-chain-jemalloc (push) Failing after 31s Details
Spellcheck / Spellcheck (push) Failing after 31s Details
Codecov / code-coverage (push) Failing after 1m38s Details
Coverity Scan / coverity (push) Has been skipped Details
External Server Tests / test-external-standalone (push) Failing after 31s Details
External Server Tests / test-external-nodebug (push) Failing after 31s Details
External Server Tests / test-external-cluster (push) Failing after 5m40s Details
CI / build-macos-latest (push) Has been cancelled Details
The vector-sets module is a part of Redis Core and is available by
default,
just like any other data type in Redis.

As a result, when building Redis from the source, the vector-sets module
is also compiled as part of the Redis binary and loaded at server
start-up (internal module).

This new data type added as a preview feature and currently doesn't
support all the capabilities in Redis like:
* 32-bit build
* C99 (requires C11 stdatomic)
* Short-read from RDB isn't handled and might lead to a memory leak
* AOF rewirte (when aof-use-rdb-preamble is off)
* active defrag
* others?
2025-04-02 21:54:15 +03:00
YaacovHazan 41b1b5df18 Add vector-sets module
The vector-sets module is a part of Redis Core and is available by default,
just like any other data type in Redis.

As a result, when building Redis from the source, the vector-sets module
is also compiled as part of the Redis binary and loaded at server start-up.

This new data type added as a preview currently doesn't support
all the capabilities in Redis like:
32-bit OS
C99
Short-read that might end with memory leak
AOF rewirte
defrag
2025-04-02 15:06:24 +00:00
YaacovHazan 78e0d87177 Add 'modules/vector-sets/' from commit 'c6db0a7c20ff5638f3a0c9ce9c106303daeb2f67'
git-subtree-dir: modules/vector-sets
git-subtree-mainline: 8ea8f4220c
git-subtree-split: c6db0a7c20
2025-04-02 16:34:28 +03:00
antirez c6db0a7c20 Don't use cross-thread unlocking. 2025-04-02 10:12:03 +02:00
DvirDukhan 8ea8f4220c
Update RediSearch Makefile - 7.99.90 (#13905)
CI / test-ubuntu-latest (push) Failing after 32s Details
CI / build-debian-old (push) Failing after 31s Details
CI / test-sanitizer-address (push) Failing after 31s Details
CI / build-32bit (push) Failing after 32s Details
CI / build-libc-malloc (push) Failing after 32s Details
CI / build-centos-jemalloc (push) Failing after 31s Details
CI / build-old-chain-jemalloc (push) Failing after 32s Details
Codecov / code-coverage (push) Failing after 31s Details
Spellcheck / Spellcheck (push) Failing after 32s Details
External Server Tests / test-external-standalone (push) Failing after 31s Details
External Server Tests / test-external-cluster (push) Failing after 31s Details
External Server Tests / test-external-nodebug (push) Failing after 31s Details
Coverity Scan / coverity (push) Has been skipped Details
CI / build-macos-latest (push) Has been cancelled Details
2025-03-31 21:26:07 +03:00
Eran Hadad 1c646662e9
Bump module version to v7.99.90 for RedisBloom, JSON and Timeseries (#13908) 2025-03-31 21:24:22 +03:00
Ozan Tezcan 366c6aff81
Put replica online when bgsave is done (#13895)
Before https://github.com/redis/redis/pull/13732, replicas were brought
online immediately after master wrote the last bytes of the RDB file to
the socket. This behavior remains unchanged if rdbchannel replication is
not used. However, with rdbchannel replication, the replica is brought
online after receiving the first ack which is sent by replica after rdb
is loaded.

To align the behavior, reverting this change to put replica online once
bgsave is done.

Additonal changes:
- INFO field `mem_total_replication_buffers` will also contain
`server.repl_full_sync_buffer.mem_used` which shows accumulated
replication stream during rdbchannel replication on replica side.
- Deleted debug level logging from some replication tests. These tests
generate thousands of keys and it may cause per key logging on some
cases.
2025-03-31 13:48:49 +03:00
Jason aa8e2d1712
Ignore shardId updates from replica nodes (#13877)
CI / test-ubuntu-latest (push) Failing after 31s Details
CI / test-sanitizer-address (push) Failing after 31s Details
CI / build-debian-old (push) Failing after 31s Details
CI / build-32bit (push) Failing after 31s Details
CI / build-libc-malloc (push) Failing after 31s Details
CI / build-centos-jemalloc (push) Failing after 31s Details
CI / build-old-chain-jemalloc (push) Failing after 31s Details
Codecov / code-coverage (push) Failing after 31s Details
Spellcheck / Spellcheck (push) Failing after 31s Details
CI / build-macos-latest (push) Has been cancelled Details
Coverity Scan / coverity (push) Has been skipped Details
External Server Tests / test-external-standalone (push) Failing after 32s Details
External Server Tests / test-external-cluster (push) Failing after 32s Details
External Server Tests / test-external-nodebug (push) Failing after 2m18s Details
Close https://github.com/redis/redis/issues/13868

This bug was introduced by https://github.com/redis/redis/pull/13468

## Issue
To maintain compatibility with older versions that do not support
shardid, when a replica passes a shardid, we also update the master’s
shardid accordingly.

However, when both the master and replica support shardid, an issue
arises: in one moment, the master may pass a shardid, causing us to
update both the master and all its replicas to match the master’s
shardid. But if the replica later passes a different shardid, we would
then update the master’s shardid again, leading to continuous changes in
shardid.

## Solution
Regardless of the situation, we always ensure that the replica’s shardid
remains consistent with the master’s shardid.
2025-03-30 15:15:04 +08:00
antirez 3dd48b5b45 README: Random Projection section. 2025-03-28 18:29:56 +01:00
Vitah Lin 057f039c4b
Fix 'RESTORE can set LFU' test (#13896)
CI / test-ubuntu-latest (push) Failing after 31s Details
CI / test-sanitizer-address (push) Failing after 31s Details
CI / build-32bit (push) Failing after 31s Details
CI / build-libc-malloc (push) Failing after 32s Details
CI / build-centos-jemalloc (push) Failing after 32s Details
CI / build-debian-old (push) Failing after 48s Details
CI / build-old-chain-jemalloc (push) Failing after 31s Details
Codecov / code-coverage (push) Failing after 31s Details
Spellcheck / Spellcheck (push) Failing after 31s Details
CodeQL / Analyze (cpp) (push) Failing after 31s Details
CI / build-macos-latest (push) Has been cancelled Details
Coverity Scan / coverity (push) Has been skipped Details
External Server Tests / test-external-standalone (push) Failing after 31s Details
External Server Tests / test-external-cluster (push) Failing after 31s Details
External Server Tests / test-external-nodebug (push) Failing after 31s Details
When the `restore foo 0 $encoded freq 100` command and `set freq [r
object freq foo]` run in different minute timestamps (i.e., when
server.unixtime/60 changes between these operations), the assertion may
fail due to the LFU decay.

This PR updates the “RESTORE can set LFU” test to verify the actual freq
value based on minute timestamps.

---------

Co-authored-by: debing.sun <debing.sun@redis.com>
2025-03-28 13:33:58 +08:00
antirez 4dca45ad24 Remove sprintf() from cJSON. 2025-03-27 12:19:56 +01:00
antirez b17499f907 Fix projection output len. 2025-03-27 12:19:40 +01:00
antirez 29c27bc13e Make HNSW CAS commit atomic.
This way we don't need to mess with node->value at a latter time
where an explicit lock would be required. Now we have:

1. Prepare context (neighbors).
2. Commit, and set the associated value.
2025-03-27 12:18:58 +01:00
antirez c61c535c32 Make Redis module merging simpler.
This way there is no need to change any file: the only
needed change is the initialization function name, that
is now controlled by the define.
2025-03-27 10:45:05 +01:00
antirez 2f17e4fb04 Prettify parseVector(). 2025-03-27 08:35:47 +01:00
antirez 63057253d8 Document threading model in a top comment. 2025-03-27 08:31:15 +01:00
antirez 3d31fc3bee VSIM thread: manipulate results while still locked. 2025-03-27 08:11:13 +01:00
debing.sun 87d8e71708
Fix defrag when type/encoding changes during scan (#13883)
CI / build-32bit (push) Failing after 32s Details
CI / test-sanitizer-address (push) Failing after 32s Details
CI / build-libc-malloc (push) Failing after 32s Details
CI / build-debian-old (push) Failing after 32s Details
CI / build-centos-jemalloc (push) Failing after 31s Details
CI / build-old-chain-jemalloc (push) Failing after 31s Details
Codecov / code-coverage (push) Failing after 31s Details
CI / test-ubuntu-latest (push) Failing after 2m7s Details
Spellcheck / Spellcheck (push) Failing after 31s Details
CI / build-macos-latest (push) Has been cancelled Details
External Server Tests / test-external-standalone (push) Failing after 31s Details
Coverity Scan / coverity (push) Has been skipped Details
External Server Tests / test-external-cluster (push) Failing after 32s Details
External Server Tests / test-external-nodebug (push) Failing after 31s Details
This PR is based on: https://github.com/valkey-io/valkey/pull/1801

[SoftlyRaining](https://github.com/SoftlyRaining) was hunting for defrag
bugs with Jim and found a couple of improvements to make. Jim pointed
out that in several of the callbacks, if the encoding were to change it
simply returns without doing anything to `cursor` to make it reach 0,
meaning that it would continue no-op working on that item without making
any progress. Type and encoding can change while the defrag scan is in
progress if the value is mutated or replaced by something else with the
same key.

---------

Signed-off-by: Rain Valentine <rsg000@gmail.com>
Co-authored-by: Rain Valentine <rsg000@gmail.com>
2025-03-27 08:58:57 +08:00
antirez f70dc8acb2 Clarify VRANDMEMBER tradeoff. 2025-03-26 23:47:47 +01:00
antirez 9180659f8b Clarify failure behaior of VectorSetRdbLoad(). 2025-03-26 23:44:39 +01:00
antirez c2d80e8ced Clarify that if CAS fails we insert blocking. 2025-03-26 23:41:55 +01:00
antirez e3243819ef Don't mess with node attributes without protection.
The background VSIMs use the node attributes (via the callback)
so we can't modify them without waiting for the background
operations to terminate.
2025-03-26 23:36:14 +01:00
antirez a6c8a15cad VADD: fix leak on thread creation failure. 2025-03-26 22:50:47 +01:00
antirez 3e2649f1f1 hnsw_insert() should never fail in practice.
We pass our aborting allocation function to the HNSW lib, the
only other reason for it to fail is pthread mutex locking failing
but this is also practically impossible AFAIK in modern systems,
and if it happens (for kernel reosurces shortage) anyway to
abort is the best thing to do: otherwise we would have to return
that we could not complete the operation for some reason, which
is not uniform with everything Redis does. In Redis under
normal conditions writes must succeed if they are semantically
correct, or the server crash for OOM.
2025-03-26 22:46:00 +01:00
Ozan Tezcan a0da8390a2
Fix use-after-free when diskless load config is not swapdb (#13887)
CI / build-macos-latest (push) Waiting to run Details
CI / test-sanitizer-address (push) Failing after 32s Details
CI / build-debian-old (push) Failing after 31s Details
CI / build-centos-jemalloc (push) Failing after 32s Details
CI / build-libc-malloc (push) Failing after 32s Details
CI / build-32bit (push) Failing after 32s Details
CI / build-old-chain-jemalloc (push) Failing after 32s Details
Codecov / code-coverage (push) Failing after 31s Details
External Server Tests / test-external-standalone (push) Failing after 32s Details
External Server Tests / test-external-cluster (push) Failing after 32s Details
External Server Tests / test-external-nodebug (push) Failing after 32s Details
CI / test-ubuntu-latest (push) Failing after 1m37s Details
Spellcheck / Spellcheck (push) Failing after 32s Details
When the diskless load configuration is set to on-empty-db, we retain a
pointer to the function library context. When emptyData() is called, it
frees this function library context pointer, leading to a use-after-free
situation.

I refactored code to ensure that emptyData() is called first, followed
by retrieving the valid pointer to the function library context.

Refactored code should not introduce any runtime implications.

Bug introduced by https://github.com/redis/redis/pull/13495 (Redis 8.0)

Co-authored-by: Oran Agra <oran@redislabs.com>
2025-03-26 21:50:10 +03:00
antirez 8dfc501fb8 VSIM: fix double free if thread creation fails. 2025-03-26 19:43:59 +01:00
antirez 9d4325ee25 VSIM NOTHREAD, mainly for testing goals. 2025-03-26 16:52:28 +01:00
antirez 707c132392 Count threaded exec time in stats. 2025-03-26 16:48:02 +01:00
antirez 08e3f958fa README: remove no longer valid RP issue.
now the projection matrix is deterministic.
2025-03-26 11:33:32 +01:00
antirez 23b3e21817 README: suggest using FP32 vs VALUES. 2025-03-26 11:28:05 +01:00
Cong Chen 981aa5c12f
Fix timing issue in HEXPIREAT test (#13873)
CI / build-macos-latest (push) Waiting to run Details
CI / build-debian-old (push) Failing after 7s Details
CI / build-centos-jemalloc (push) Failing after 3s Details
CI / build-old-chain-jemalloc (push) Failing after 3s Details
CI / build-32bit (push) Failing after 21s Details
Codecov / code-coverage (push) Failing after 8s Details
CI / build-libc-malloc (push) Successful in 50s Details
CI / test-ubuntu-latest (push) Failing after 2m9s Details
CI / test-sanitizer-address (push) Failing after 2m40s Details
Spellcheck / Spellcheck (push) Successful in 9m2s Details
External Server Tests / test-external-standalone (push) Failing after 32s Details
External Server Tests / test-external-cluster (push) Failing after 32s Details
Coverity Scan / coverity (push) Has been skipped Details
External Server Tests / test-external-nodebug (push) Failing after 31s Details
This fixes an error that occurs in the job
[test-valgrind-no-malloc-usable-size-test](https://github.com/redis/redis/actions/runs/13912357739/job/38929051397)
of the Daily workflow:

```
*** [err]: HEXPIREAT - Set time and then get TTL (listpackex) in tests/unit/type/hash-field-expire.tcl
Expected '999' to be between to '1000' and '2000' (context: type eval line 6 cmd {assert_range [r hpttl myhash FIELDS 1 field1] 1000 2000} proc ::test)
```
2025-03-26 10:00:38 +08:00
antirez 16e3c5a8f9 Locks error checking improved. 2025-03-24 19:10:28 +01:00
antirez adfd2dc7c0 Remove useless OOM checks, but handle mutex creation failure. 2025-03-24 12:54:41 +01:00
antirez 8bf9b8abc1 Use Hadamard-based projection.
Works better and being deterministic (only relative to the projection
size) the replicas will have the same matrix automatically.
2025-03-24 12:48:04 +01:00
Oran Agra 2a189709e0
avoid possible use-after-free with module KSN changes (#13875)
CI / build-debian-old (push) Failing after 4s Details
CI / build-centos-jemalloc (push) Failing after 3s Details
CI / build-old-chain-jemalloc (push) Failing after 3s Details
CI / build-32bit (push) Failing after 18s Details
CI / build-libc-malloc (push) Successful in 53s Details
CI / test-sanitizer-address (push) Failing after 1m6s Details
CI / test-ubuntu-latest (push) Failing after 2m57s Details
Spellcheck / Spellcheck (push) Successful in 9m5s Details
Coverity Scan / coverity (push) Has been skipped Details
External Server Tests / test-external-cluster (push) Failing after 31s Details
External Server Tests / test-external-standalone (push) Failing after 6m35s Details
External Server Tests / test-external-nodebug (push) Failing after 15m1s Details
CI / build-macos-latest (push) Has been cancelled Details
in #13505, we changed the code to use the string value of the key rather
than the integer value on the stack, but we have a test in
unit/moduleapi/keyspace_events that uses keyspace notification hook to
modify the value with RM_StringDMA, which can cause this value to be
released before used. the reason it didn't happen so far is because we
were using shared integers, so releasing the object doesn't free it.
2025-03-24 12:24:52 +02:00
antirez 958ebee091 README: specify how to add REDUCE in VADD. 2025-03-24 09:55:45 +01:00
Yuan Wang 319bbcc1a7
Fix sdscatprintf error of the in output of `info stats` (#13871)
CI / build-macos-latest (push) Waiting to run Details
CI / build-debian-old (push) Failing after 4s Details
CI / build-32bit (push) Failing after 15s Details
CI / build-centos-jemalloc (push) Failing after 3s Details
CI / build-old-chain-jemalloc (push) Failing after 2s Details
CI / test-sanitizer-address (push) Failing after 1m2s Details
Codecov / code-coverage (push) Failing after 33s Details
CI / build-libc-malloc (push) Successful in 48s Details
CI / test-ubuntu-latest (push) Failing after 2m51s Details
Spellcheck / Spellcheck (push) Failing after 9s Details
Coverity Scan / coverity (push) Has been skipped Details
External Server Tests / test-external-standalone (push) Failing after 33s Details
External Server Tests / test-external-nodebug (push) Failing after 32s Details
External Server Tests / test-external-cluster (push) Failing after 9m29s Details
CI failed: https://github.com/redis/redis/actions/runs/13981749993/job/39148249096,
since i don't reassign `info` after `sdscatprintf(info, xxx)`
Thanks to @sundb for spotting this
introduced in https://github.com/redis/redis/pull/13846
2025-03-24 09:17:58 +08:00
debing.sun 87b7c3ac1a
Fix rax node defragmentaion being skipped (#13847)
First, when we do `raxSeek()` and then call raxNext, we will get the
`RAX_ITER_JUST_SEEKED` flag and return success directly.
We always set the node defrag callback after `raxSeek()`, which means
that when we break from defragmentation, the first node that comes in
again will never be defragged.

In this PR, we save the last as the next node to be processed, not the
last node to be completed.
This way we defrag the next node when we exit to avoid it being skipped
on the next resume.

---------

Co-authored-by: oranagra <oran@redislabs.com>
2025-03-24 08:57:08 +08:00
antirez 8007ccd51b Use RESP3-friendly bool replies. 2025-03-23 20:14:40 +01:00
antirez 9cc750fd66 Test: projection regression test fixed. 2025-03-23 15:04:58 +01:00