Commit Graph

12620 Commits

Author SHA1 Message Date
debing.sun 26dcec4812
Fix messed-up unblocked clients in flush command (#13865)
CI / build-macos-latest (push) Waiting to run Details
CI / build-debian-old (push) Failing after 6s Details
CI / build-centos-jemalloc (push) Failing after 5s Details
CI / build-old-chain-jemalloc (push) Failing after 3s Details
Codecov / code-coverage (push) Failing after 7s Details
CI / build-32bit (push) Failing after 20s Details
CI / build-libc-malloc (push) Successful in 47s Details
CI / test-sanitizer-address (push) Failing after 2m6s Details
CI / test-ubuntu-latest (push) Failing after 2m11s Details
External Server Tests / test-external-standalone (push) Failing after 2m13s Details
External Server Tests / test-external-nodebug (push) Failing after 2m11s Details
External Server Tests / test-external-cluster (push) Failing after 2m18s Details
Spellcheck / Spellcheck (push) Successful in 9m4s Details
Fix https://github.com/redis/redis/pull/13853#pullrequestreview-2675227138

This PR ensures that the client's current command is not reset by
unblockClient(), while still needing to be handled after `unblockclient()`.
The FLUSH command still requires reprocessing (update the replication
offset) after unblockClient(). Therefore, we mark such blocked clients
with the CLIENT_PENDING_COMMAND flag to prevent the command from being
reset during unblockClient().
2025-03-19 10:22:47 +08:00
antirez 3424757f4d Test: added another threading stress test.
This access pattern triggered the bug fixed
about VADD and CAS in 70ffa8c.
2025-03-18 23:18:26 +01:00
antirez 70ffa8ce5c Fix VADD_CASReply() NULL reference on ID mismatch.
This bug was fixed thanks to the kind help of Dvir Dukhan
(@DvirDukhan) that found it and provided useful context.
2025-03-18 21:37:06 +01:00
antirez 99176b3e04 Test: VRANDMEMBER test added. 2025-03-18 16:49:27 +01:00
antirez 22ce9f3fad VRANDMEMBER command implemented. 2025-03-17 23:52:15 +01:00
debing.sun a5a3afd923
Fix crash during SLAVEOF when clients are blocked on lazyfree (#13853)
CI / build-debian-old (push) Failing after 7s Details
CI / build-centos-jemalloc (push) Failing after 6s Details
CI / build-old-chain-jemalloc (push) Failing after 4s Details
Codecov / code-coverage (push) Failing after 7s Details
CI / build-libc-malloc (push) Successful in 53s Details
CI / test-sanitizer-address (push) Failing after 1m4s Details
CI / test-ubuntu-latest (push) Failing after 2m9s Details
CI / build-32bit (push) Failing after 9m50s Details
Spellcheck / Spellcheck (push) Successful in 9m0s 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 6m36s Details
External Server Tests / test-external-nodebug (push) Failing after 9m54s Details
CI / build-macos-latest (push) Has been cancelled Details
After https://github.com/redis/redis/pull/13167, when a client calls
`FLUSHDB` command, we still async empty database, and the client was
blocked until the lazyfree completes.

1) If another client calls `SLAVEOF` command during this time, the
server will unblock all blocked clients, including those blocked by the
lazyfree. However, when unblocking a lazyfree blocked client, we forgot
to call `updateStatsOnUnblock()`, which ultimately triggered the
following assertion.

2) If a client blocked by Lazyfree is unblocked midway, and at this
point the `bio_comp_list` has already received the completion
notification for the bio, we might end up processing a client that has
already been unblocked in `flushallSyncBgDone()`. Therefore, we need to
filter it out.

---------

Co-authored-by: oranagra <oran@redislabs.com>
2025-03-17 20:27:05 +08:00
YaacovHazan 095c131fbb Redis 8.0 M04
CI / test-sanitizer-address (push) Failing after 32s Details
CI / build-debian-old (push) Failing after 32s 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 31s Details
CI / build-old-chain-jemalloc (push) Failing after 32s Details
Codecov / code-coverage (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 32s Details
External Server Tests / test-external-nodebug (push) Failing after 32s Details
Spellcheck / Spellcheck (push) Failing after 31s Details
CI / test-ubuntu-latest (push) Failing after 10m24s Details
CI / build-macos-latest (push) Has been cancelled Details
2025-03-16 10:12:40 +02:00
YaacovHazan 89eef40ca2 Merge remote-tracking branch 'upstream/unstable' into HEAD 2025-03-16 10:01:10 +02:00
kei-nan 752576ce47
Use Search v7.99.5 (#13859)
CI / build-macos-latest (push) Waiting to run Details
CI / test-ubuntu-latest (push) Failing after 32s 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 32s 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 2m7s Details
External Server Tests / test-external-nodebug (push) Failing after 2m5s Details
External Server Tests / test-external-cluster (push) Failing after 8m25s Details
2025-03-16 10:00:51 +02:00
antirez 706721f8c8 HSNW: random node. 2025-03-16 00:08:43 +01:00
antirez 8a5cf17cb2 HNSW: cursor fixes and thread safety. 2025-03-15 23:31:24 +01:00
antirez a363e5fe6d README: memory usage section. 2025-03-15 23:16:28 +01:00
antirez 6e434bcaaf HNSW: use node max link property.
This is both more correct in formal terms, and in practical
terms as well, as we could over-allocate nodes sometimes.
2025-03-15 10:30:14 +01:00
antirez 68d3067125 w2v test: fix recall EF usage. 2025-03-15 10:24:20 +01:00
antirez d94058fad9 w2v test: recall histograms + configurable M. 2025-03-15 09:46:42 +01:00
antirez c1c7eeaa69 Document VADD M parameter. 2025-03-15 09:28:55 +01:00
antirez 542736ce25 w2v test: proper recall test added. 2025-03-15 00:24:10 +01:00
antirez 13a0a63bef Copyright Sanfilipo -> Redis Ltd. 2025-03-14 23:06:22 +01:00
antirez d996eb82ef VADD: make M configurable at creation time. 2025-03-13 16:58:55 +01:00
antirez 4e57d3f76f README: grammar. 2025-03-13 15:56:05 +01:00
antirez 2fcf389f2a README: troubleshooting and understandability. 2025-03-13 13:25:48 +01:00
antirez 9500539c55 HNSW: implement last resort node reallocation. 2025-03-13 11:30:07 +01:00
antirez 095842a748 README: scaling information. 2025-03-12 22:58:33 +01:00
antirez 63ae981599 README: show main scalability property of vsets. 2025-03-12 18:41:49 +01:00
antirez cc3874ab87 VADD CAS: fallback when thread creation fails. 2025-03-12 16:57:03 +01:00
antirez f05912dea2 cJSON updated to latest version. 2025-03-12 09:55:23 +01:00
YaacovHazan 84471e238e
Redis 8.0 RC1 (#13851)
CI / test-ubuntu-latest (push) Failing after 32s Details
CI / test-sanitizer-address (push) Failing after 31s Details
CI / build-32bit (push) Failing after 33s Details
CI / build-libc-malloc (push) Failing after 32s Details
CI / build-centos-jemalloc (push) Failing after 48s Details
CI / build-old-chain-jemalloc (push) Failing after 49s Details
External Server Tests / test-external-standalone (push) Failing after 32s Details
External Server Tests / test-external-nodebug (push) Failing after 12s Details
External Server Tests / test-external-cluster (push) Failing after 32s Details
Spellcheck / Spellcheck (push) Failing after 32s Details
Codecov / code-coverage (push) Failing after 2m47s Details
CI / build-debian-old (push) Failing after 11m59s Details
CI / build-macos-latest (push) Has been cancelled Details
- Merge latest unstable
- Update version and release notes
2025-03-11 20:16:27 +02:00
YaacovHazan d1df881ec5 Redis 8.0 RC1 2025-03-11 10:03:17 +02:00
YaacovHazan 53949521de Merge remote-tracking branch 'upstream/unstable' into HEAD 2025-03-11 09:39:04 +02:00
Eran Hadad b704179f15
Update release of RedisJSON, RedisTS and RedisBloom 7.99.4 (#13850)
CI / test-ubuntu-latest (push) Failing after 32s Details
CI / build-32bit (push) Failing after 25s Details
CI / build-centos-jemalloc (push) Failing after 3s Details
CI / build-old-chain-jemalloc (push) Failing after 3s Details
CI / test-sanitizer-address (push) Failing after 1m0s Details
CI / build-libc-malloc (push) Failing after 31s Details
Codecov / code-coverage (push) Failing after 55s Details
CI / build-debian-old (push) Failing after 8m12s Details
Spellcheck / Spellcheck (push) Successful in 9m45s Details
CI / build-macos-latest (push) Has been cancelled Details
External Server Tests / test-external-standalone (push) Failing after 31s Details
External Server Tests / test-external-cluster (push) Failing after 31s Details
Coverity Scan / coverity (push) Has been skipped Details
External Server Tests / test-external-nodebug (push) Failing after 31s Details
CodeQL / Analyze (cpp) (push) Failing after 31s Details
2025-03-11 09:36:28 +02:00
DvirDukhan 557e0b1c07
Update Makefile with search 7.99.4 (#13848) 2025-03-09 13:55:27 +02:00
YaacovHazan a39ffc1fe9 Merge remote-tracking branch 'upstream/unstable' into HEAD 2025-03-09 10:08:03 +02:00
antirez f829d46535 HNSW: creation time M parameter VS hardcoded. 2025-03-08 16:15:15 +01:00
antirez 0258e85186 VSIM TRUTH option for ground truth results. 2025-03-07 09:58:16 +01:00
debing.sun f364dcca2d
Make RM_DefragRedisModuleDict API support incremental defragmentation for dict leaf (#13840)
After https://github.com/redis/redis/pull/13816, we make a new API to
defrag RedisModuleDict.
Currently, we only support incremental defragmentation of the dictionary
itself, but the defragmentation of values is still not incremental. If
the values are very large, it could lead to significant blocking.
Therefore, in this PR, we have added incremental defragmentation for the
values.

The main change is to the `RedisModuleDefragDictValueCallback`, we
modified the return value of this callback.
When the callback returns 1, we will save the `seekTo` as the key of the
current unfinished node, and the next time we enter, we will continue
defragmenting this node.
When the return value is 0, we will proceed to the next node.

## Test
Since each dictionary in the global dict originally contained only 10
strings, but now it has been changed to a nested dictionary, each
dictionary now has 10 sub-dictionaries, with each sub-dictionary
containing 10 strings, this has led to a corresponding reduction in the
defragmentation time obtained from other tests.
Therefore, the other tests have been modified to always wait for
defragmentation to be turned off before the test begins, then start it
after creating fragmentation, ensuring that they can always run for a
full defragmentation cycle.

---------

Co-authored-by: ephraimfeldblum <ephraim.feldblum@redis.com>
2025-03-04 17:19:41 +08:00
antirez 2114c65012 VINFO: add attributes count. 2025-03-04 09:35:41 +01:00
antirez ed7c539303 Improve Vector Sets MEMORY USAGE implementation.
Now attributes are added as well. Moreover the code no longer uses
the first node to guess the size of the items, but does an average
of the few first items/attributes found. Still O(1) but more precise.
2025-03-04 09:35:41 +01:00
antirez 1d09d67909 Tests: regressios for MEMORY USAGE / DEBUG DIGEST. 2025-03-04 09:35:41 +01:00
antirez 1f92040fcf Fix MEMORY USAGE and DEBUG DIGEST crash.
After adding attributes, the code was still accessing
node->value as a string, but now this is mediated by the value
object.

Close #5
2025-03-04 09:35:41 +01:00
Rowan Trollope 0f2c356b07
Merge pull request #4 from rowantrollope/main
Update readme to fix VGET
2025-03-03 12:31:10 -08:00
Rowan Trollope 0e3ee9afb4 Update readme to fix VGET
VGET -> VGETATTR :)
2025-03-03 11:14:36 -08:00
antirez ab5e01d6bc README: Remove the term "hybrid" search. 2025-03-03 17:29:41 +01:00
antirez b49bc14f96 Fix README conflict. 2025-03-03 13:12:25 +01:00
antirez 883d9e3a75 README: example data set. 2025-03-03 13:10:10 +01:00
antirez 07fd2fa8a6 README: extensive hybrid search documentation. 2025-03-03 10:07:05 +01:00
antirez afcc2ff6e8 LICENSE: change copyright to Redis Ltd. 2025-03-03 09:51:26 +01:00
antirez 4b0bd5b0bd README: VSETATTR / VGETATTR first documentation. 2025-03-03 09:44:40 +01:00
antirez 1ad503001f README: initial documentation of hybrid search. 2025-03-02 22:41:34 +01:00
antirez 6c95ec1d6c Test: fix integration test for FILTER. 2025-03-02 13:38:32 +01:00
antirez abe33257d9 Expr: improve selectors / operators parsing. 2025-03-02 12:58:06 +01:00