Commit graph

76 commits

Author SHA1 Message Date
Martin Dimitrov
0024d5dfde
Vectorize binary quantization path for vectorsets distance calculation (#14492)
Some checks failed
CI / test-ubuntu-latest (push) Waiting to run
CI / test-sanitizer-address (push) Waiting to run
CI / build-debian-old (push) Waiting to run
CI / build-macos-latest (push) Waiting to run
CI / build-32bit (push) Waiting to run
CI / build-libc-malloc (push) Waiting to run
CI / build-centos-jemalloc (push) Waiting to run
CI / build-old-chain-jemalloc (push) Waiting to run
Codecov / code-coverage (push) Waiting to run
External Server Tests / test-external-standalone (push) Waiting to run
External Server Tests / test-external-cluster (push) Waiting to run
External Server Tests / test-external-nodebug (push) Waiting to run
Spellcheck / Spellcheck (push) Waiting to run
Reply-schemas linter / reply-schemas-linter (push) Has been cancelled
This PR adds SIMD vectorization for binary quantization distance
calculation, similar to PR #14474.

---------

Co-authored-by: debing.sun <debing.sun@redis.com>
2026-01-29 19:59:48 +08:00
Filipe Oliveira (Redis)
319153fe46
[Vector sets] Replace manual popcount with __builtin_popcountll for binary vector distance (#13962)
Some checks failed
CI / test-ubuntu-latest (push) Has been cancelled
CI / test-sanitizer-address (push) Has been cancelled
CI / build-debian-old (push) Has been cancelled
CI / build-macos-latest (push) Has been cancelled
CI / build-32bit (push) Has been cancelled
CI / build-libc-malloc (push) Has been cancelled
CI / build-centos-jemalloc (push) Has been cancelled
CI / build-old-chain-jemalloc (push) Has been cancelled
Codecov / code-coverage (push) Has been cancelled
External Server Tests / test-external-standalone (push) Has been cancelled
External Server Tests / test-external-cluster (push) Has been cancelled
External Server Tests / test-external-nodebug (push) Has been cancelled
Spellcheck / Spellcheck (push) Has been cancelled
This PR replaces the manual `popcount64()` implementation with
`__builtin_popcountll()` for computing Hamming distance in binary
vectors, when the underlying hardware supports the `POPCNT` instruction.

The built-in version simplifies the code and enables the compiler to
emit a single `POPCNT` instruction on supported CPUs, which is
significantly faster than the manual bitwise method. You can verify the
difference here:
[https://godbolt.org/z/TxWMcE8M3](https://godbolt.org/z/TxWMcE8M3) — the
manual version generates a long sequence of instructions (approximately
34 on modern HW) vs 1 instruction (popcnt) when using
__builtin_popcountll()

## Portability across platforms

This change maintains full portability across platforms and compilers.
The use of `__builtin_popcountll()` is guarded by the `HAVE_POPCNT`
macro, which is defined only when the compiler supports the
target("popcnt") attribute. At runtime, we also check
`__builtin_cpu_supports("popcnt")` to ensure the hardware provides
support for the instruction. If not available, the implementation safely
falls back to the original manual `popcount64()` logic.

---------

Co-authored-by: debing.sun <debing.sun@redis.com>
2026-01-28 09:42:46 +08:00
Martin Dimitrov
37f685908e
Vectorized the quantized 8-bit vector distance calculation (#14474)
Some checks are pending
CI / test-ubuntu-latest (push) Waiting to run
CI / test-sanitizer-address (push) Waiting to run
CI / build-debian-old (push) Waiting to run
CI / build-macos-latest (push) Waiting to run
CI / build-32bit (push) Waiting to run
CI / build-libc-malloc (push) Waiting to run
CI / build-centos-jemalloc (push) Waiting to run
CI / build-old-chain-jemalloc (push) Waiting to run
Codecov / code-coverage (push) Waiting to run
External Server Tests / test-external-standalone (push) Waiting to run
External Server Tests / test-external-cluster (push) Waiting to run
External Server Tests / test-external-nodebug (push) Waiting to run
Spellcheck / Spellcheck (push) Waiting to run
This pull request vectorizes the 8-bit quantization vector-search path
in a similar was as the non-quantization path.
The assembly intrinsics are a bit more complicated than in the
non-quantization path, since we are operating on 8-bit integers and we
need to worry about preventing overflow. Thus, after loading the 8-bit
integers, they are extended into 16-bits before multiplying and
accumulating into 32-bit integers.

---------

Co-authored-by: debing.sun <debing.sun@redis.com>
2026-01-27 09:25:59 +08:00
Omer Shadmi
8816bcd973
MOD-13504: Update Search to RC1 8.5.90 (#14717)
Update Search to 8.6 RC1 version 8.5.90
2026-01-20 11:07:15 +02:00
Tom Gabsow
c42d07a76e
MOD-13505 Update DataType Modules to 8.5.90 (#14705)
Some checks are pending
CI / test-ubuntu-latest (push) Waiting to run
CI / test-sanitizer-address (push) Waiting to run
CI / build-debian-old (push) Waiting to run
CI / build-macos-latest (push) Waiting to run
CI / build-32bit (push) Waiting to run
CI / build-libc-malloc (push) Waiting to run
CI / build-centos-jemalloc (push) Waiting to run
CI / build-old-chain-jemalloc (push) Waiting to run
Codecov / code-coverage (push) Waiting to run
External Server Tests / test-external-standalone (push) Waiting to run
External Server Tests / test-external-cluster (push) Waiting to run
External Server Tests / test-external-nodebug (push) Waiting to run
Spellcheck / Spellcheck (push) Waiting to run
update data type modules to 8.6 RC1
time series v8.5.90
bloom v8.5.90
json v8.5.90
2026-01-19 09:37:07 +02:00
Kalin Staykov
23a947ee3d fix Rust installation checksums 2026-01-14 13:41:20 +02:00
LukeMathWalker
cb842d6cc2 chore: Bump Rust stable version from 1.88.0 to 1.92.0 2026-01-14 12:10:53 +02:00
Salvatore Sanfilippo
60a4fa2e4b
Vsets: Remove stale note about replication from README. (#14528) 2026-01-13 16:13:59 +08:00
h.o.t. neglected
c5f3d3e11c
Fix use-after-free in hnsw_cursor_free (#14627)
Some checks failed
CI / test-ubuntu-latest (push) Has been cancelled
CI / test-sanitizer-address (push) Has been cancelled
CI / build-debian-old (push) Has been cancelled
CI / build-macos-latest (push) Has been cancelled
CI / build-32bit (push) Has been cancelled
CI / build-libc-malloc (push) Has been cancelled
CI / build-centos-jemalloc (push) Has been cancelled
CI / build-old-chain-jemalloc (push) Has been cancelled
Codecov / code-coverage (push) Has been cancelled
External Server Tests / test-external-standalone (push) Has been cancelled
External Server Tests / test-external-cluster (push) Has been cancelled
External Server Tests / test-external-nodebug (push) Has been cancelled
Spellcheck / Spellcheck (push) Has been cancelled
Close https://github.com/redis/redis/issues/14626.

Note that this method hasn't been used by any place.
2025-12-22 10:34:50 +08:00
debing.sun
679e009b73
Add daily CI for vectorset (#14302)
Some checks failed
CI / test-ubuntu-latest (push) Has been cancelled
CI / test-sanitizer-address (push) Has been cancelled
CI / build-debian-old (push) Has been cancelled
CI / build-macos-latest (push) Has been cancelled
CI / build-32bit (push) Has been cancelled
CI / build-libc-malloc (push) Has been cancelled
CI / build-centos-jemalloc (push) Has been cancelled
CI / build-old-chain-jemalloc (push) Has been cancelled
Codecov / code-coverage (push) Has been cancelled
External Server Tests / test-external-standalone (push) Has been cancelled
External Server Tests / test-external-cluster (push) Has been cancelled
External Server Tests / test-external-nodebug (push) Has been cancelled
Spellcheck / Spellcheck (push) Has been cancelled
2025-12-10 08:52:43 +08:00
alonre24
42f36755ed
Update RediSearch to v8.4.2 (#14542)
Some checks failed
CI / test-ubuntu-latest (push) Has been cancelled
CI / test-sanitizer-address (push) Has been cancelled
CI / build-debian-old (push) Has been cancelled
CI / build-macos-latest (push) Has been cancelled
CI / build-32bit (push) Has been cancelled
CI / build-libc-malloc (push) Has been cancelled
CI / build-centos-jemalloc (push) Has been cancelled
CI / build-old-chain-jemalloc (push) Has been cancelled
Codecov / code-coverage (push) Has been cancelled
External Server Tests / test-external-standalone (push) Has been cancelled
External Server Tests / test-external-cluster (push) Has been cancelled
External Server Tests / test-external-nodebug (push) Has been cancelled
Spellcheck / Spellcheck (push) Has been cancelled
[8.4] Validate CLUSTER SHARDS Reply - [MOD-12432]
(b6301f5c7b)
[8.4] Fix TLS config check - [MOD-12408]
(6606e8112b)

[MOD-12432]:
https://redislabs.atlassian.net/browse/MOD-12432?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
[MOD-12408]:
https://redislabs.atlassian.net/browse/MOD-12408?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
2025-11-17 20:48:32 +02:00
alonre24
6d3e1fd4ac
Bump Redisearch module version to v8.4.1 (#14536)
Some checks failed
CI / test-ubuntu-latest (push) Has been cancelled
CI / test-sanitizer-address (push) Has been cancelled
CI / build-debian-old (push) Has been cancelled
CI / build-macos-latest (push) Has been cancelled
CI / build-32bit (push) Has been cancelled
CI / build-libc-malloc (push) Has been cancelled
CI / build-centos-jemalloc (push) Has been cancelled
CI / build-old-chain-jemalloc (push) Has been cancelled
Codecov / code-coverage (push) Has been cancelled
External Server Tests / test-external-standalone (push) Has been cancelled
External Server Tests / test-external-cluster (push) Has been cancelled
External Server Tests / test-external-nodebug (push) Has been cancelled
Spellcheck / Spellcheck (push) Has been cancelled
Fix FT.CREATE failure with LeanVec parameters on non-Intel
architectures(4b9dceb235)
2025-11-13 10:16:53 +02:00
alonre24
fafbf53e98
Update RediSearch version to 8.4.0 (8.4 GA) (#14530)
Some checks are pending
CI / test-ubuntu-latest (push) Waiting to run
CI / test-sanitizer-address (push) Waiting to run
CI / build-debian-old (push) Waiting to run
CI / build-macos-latest (push) Waiting to run
CI / build-32bit (push) Waiting to run
CI / build-libc-malloc (push) Waiting to run
CI / build-centos-jemalloc (push) Waiting to run
CI / build-old-chain-jemalloc (push) Waiting to run
Codecov / code-coverage (push) Waiting to run
External Server Tests / test-external-standalone (push) Waiting to run
External Server Tests / test-external-cluster (push) Waiting to run
External Server Tests / test-external-nodebug (push) Waiting to run
Spellcheck / Spellcheck (push) Waiting to run
2025-11-12 10:30:27 +02:00
Tom Gabsow
1fddc44c61
update modules to 8.4.0 (#14519) 2025-11-10 14:39:38 +02:00
alonre24
a14ac5e731
Update RediSearch to 8.4 RC1 (v8.3.90) (#14467)
(https://github.com/RediSearch/RediSearch/pull/7076,
https://github.com/RediSearch/RediSearch/pull/6857) - Introducing
`FT.HYBRID`, a new command that enables hybrid queries combining both
text and vector search, with support for **RRF** and **LINEAR** result
combination. This update enhances performance and reliability through a
more efficient networking layer, smoother query execution, and improved
overall stability.
(https://github.com/RediSearch/RediSearch/pull/7065) - Add
`search-default-scorer` configuration to set the default text scorer
across queries (by default it is BM25).
https://github.com/RediSearch/RediSearch/pull/7022 - Handle Atomic Slot
Migration events upon moving slots from one node to another in a cluster
mode.
(https://github.com/RediSearch/RediSearch/pull/6769,
https://github.com/RediSearch/RediSearch/pull/6828,
https://github.com/RediSearch/RediSearch/pull/6877,
https://github.com/RediSearch/RediSearch/pull/6921) - Introduce query
time memory guardrails by adding a new `search-on-oom` configuration
which defines the query engine behavior when OOM (Out Of Memory) is
reached. OOM checks are applied to `FT.SEARCH`, `FT.AGGREGATE`, and
`FT.HYBRID` commands. The behavior on OOM can be configured to one of
three modes: `IGNORE`, `FAIL`, or `RETURN`.
`IGNORE` - The default behavior, run queries anyway (not recommended for
heavy queries returning a large result set).
`FAIL` - Fail query execution immediately if any of the nodes are in OOM
state when query execution starts.
`RETURN` - A best effort appraoch to return partial results when OOM is
detected in only some of the nodes in a cluster mode.
2025-10-27 11:56:03 +02:00
Tom Gabsow
815276f945
Update Json version 8.3.90 (#14453)
8.4 RC1
2025-10-27 11:54:59 +02:00
Tom Gabsow
0286257e59
Update RedisBloom module version to v8.3.90 (#14454) 2025-10-27 11:54:35 +02:00
Tom Gabsow
efb2aa2cb2
Update time series version to v8.3.90 (#14468) 2025-10-27 11:54:13 +02:00
Mincho Paskalev
414758dd98
Guard calls to vectorDistanceFloat SIMD calls behind ifdefs (#14458) 2025-10-25 15:32:35 +03:00
Martin Dimitrov
976041cbeb
Vectorize vectors_distance_float in vector-sets (#14222)
Some checks are pending
CI / test-ubuntu-latest (push) Waiting to run
CI / test-sanitizer-address (push) Waiting to run
CI / build-debian-old (push) Waiting to run
CI / build-macos-latest (push) Waiting to run
CI / build-32bit (push) Waiting to run
CI / build-libc-malloc (push) Waiting to run
CI / build-centos-jemalloc (push) Waiting to run
CI / build-old-chain-jemalloc (push) Waiting to run
Codecov / code-coverage (push) Waiting to run
External Server Tests / test-external-standalone (push) Waiting to run
External Server Tests / test-external-cluster (push) Waiting to run
External Server Tests / test-external-nodebug (push) Waiting to run
Spellcheck / Spellcheck (push) Waiting to run
Conducted tests on IceLake server with LAION 512 1M vectors dataset. We
can see in the perf profile, that function ‘vector_distance_float’ is
consuming majority of the computation time (this profile is captured
during upload). Vectorizing this function, leads to about 2.38X speedup
in upload time and 1.45X speedup in RPS during search.

---------

Co-authored-by: debing.sun <debing.sun@redis.com>
Co-authored-by: Omer Shadmi <76992134+oshadmi@users.noreply.github.com>
2025-10-24 12:46:18 +08:00
Salvatore Sanfilippo
3de2fdad58
[vector sets] VRANGE implementation (#14235)
This is basically the Vector Set iteration primitive.
It exploits the underlying radix tree implementation.
The usage pattern is strongly reminiscent of other Redis commands doing
similar things.

The command usage is straightforward:

```
> VRANGE word_embeddings_int8 [Redis + 10
 1) "Redis"
 2) "Rediscover"
 3) "Rediscover_Ashland"
 4) "Rediscover_Northern_Ireland"
 5) "Rediscovered"
 6) "Rediscovered_Bookshop"
 7) "Rediscovering"
 8) "Rediscovering_God"
 9) "Rediscovering_Lost"
10) "Rediscovers"
```

The above command returns 10 (or less, if less are available in the
specified range) elements from "Redis" (inclusive) to the maximum
possible element. The comparison is performed byte by byte, as
`memcmp()` would do, in this way the elements have a total order. The
start and end range can be either a string, prefixed
by `[` or `(` (the prefix is mandatory) to tell the command if the range
is inclusive or exclusive, or can be the special symbols `-` and `+`
that means the maximum and minimum element.

More info can be found in the implementation itself and in the README
file change.

---------

Co-authored-by: debing.sun <debing.sun@redis.com>
2025-10-09 10:14:14 +08:00
Joan Fontanals
97df5b5411
[RED-170693] Limit efSearch parameter to avoid heap overflow (#14373)
This PR aims to avoid the situation of a potential crash when efSearch
is too large (and therefore the memory allocated could lead to a server
crash or an integer overflow (where less memory is allocated than
expected).

- Limit the accepted EF in the request o 100_000 as in VADD
- Limit the ef search to the number of nodes in the HNSW graph
2025-10-05 16:15:24 +08:00
Tom Gabsow
161130f412
Update json version 8.3.80 (#14399) 2025-09-30 20:06:17 +03:00
Tom Gabsow
2cd4afb39a
Update bloom v8.3.80 (#14398) 2025-09-30 20:05:40 +03:00
Tom Gabsow
77c995dcbd
Update time series v8.3.80 (#14397) 2025-09-30 20:05:04 +03:00
Rushabh Mehta
e8726d18e5
[vector sets] Add --ollama-url option to configure embedding server (#14317)
This PR adds a `--ollama-url` option to `cli.py`, the lightweight
redis-cli-like tool that expands !"text" arguments into embeddings via
Ollama.

Previously, the embedding call was hardcoded to
http://localhost:11434/api/embeddings. With this change, users can
specify a custom Ollama server URL when starting the tool.

If no URL is provided, the tool defaults to what it was before.
2025-09-15 09:33:18 +08:00
h.o.t. neglected
64f63bfcb0
Fix help docs of vector-set commands (#14192)
Fix https://github.com/redis/redis/issues/14026
Use `RedisModule_SetCommandInfo` to add help info for vector-set
commands.
2025-09-11 11:49:42 +08:00
Vitah Lin
38d16a82eb
Fix missing prev update in hnsw_cursor_free causing unlink failure (#14050)
This PR fixes a bug in the `hnsw_cursor_free` function where the prev
pointer was never updated during cursor list traversal. As a result, if
the cursor being freed was not the head of the list, it would not be
correctly unlinked, potentially causing memory leaks or corruption of
the cursor list.

Note that since `hnsw_cursor_free()` is never used for now, this PR does
not actually fix any bug.
2025-08-28 21:17:55 +08:00
alonre24
b99ca67ec3
RediSearch v8.2.1 (#14269)
* Protect cursors that are running in the background for FT.AGGREGATE
command while running FLUSHDB and avoid server crash -
https://github.com/RediSearch/RediSearch/pull/6601
* Fix performance regression in `info` command upon computing search
indexes memory due to a change in Trie data structure implementation,
and having it in O(1) again -
https://github.com/RediSearch/RediSearch/pull/6621
2025-08-13 22:26:02 +03:00
Salvatore Sanfilippo
674b829981
VSIM EPSILON fixes (#14223)
Hi, this PR implements the following changes:

1. The EPSILON option of VSIM is now documented.
2. The EPSILON behavior was fixed: the score was incorrectly divided by
two in the meaning, with a 0-2 interval provided by the underlying
cosine similarity, instead of the 0-1 interval. So an EPSILON of 0.2
only returned elements with a distance between 1 and 0.9 instead of 1
and 0.8. This is a *breaking change* but the command was not documented
so far, and it is a fix, as the user sees the similarity score so was a
total mismatch. I believe this fix should definitely be back ported as
soon as possible.
3. There are now tests.

Thanks for checking,
Salvatore
2025-08-12 11:45:35 +08:00
Eran Hadad
c636d80a77
Update Bloom, Json, and Timeserise to 8.2.0 (#14230) 2025-07-31 12:00:44 +03:00
alonre24
96ff42b20e
Bump RediSearch to 8.2.0 (#14232)
* Expose more compression variants for the new SVS-VAMANA vector index -
https://github.com/RediSearch/RediSearch/pull/6430
* Add the optional `SHARD_K_RATIO` parameter for KNN vector query in a
cluster environment to favor network latency reduction at the expense of
accuracy (under unsatble features) -
https://github.com/RediSearch/RediSearch/pull/6531,
https://github.com/RediSearch/RediSearch/pull/6535
2025-07-31 11:55:31 +03:00
Salvatore Sanfilippo
b528788f65
Fix vrand ping pong (#14183)
VRANDMEMBER had a bug when exactly two elements where present in the
vector set: we selected a fixed number of random paths to take, and this
will lead always to the same element. This PR should be kindly
back-ported to Redis 8.x.
2025-07-18 18:19:14 +08:00
Ali-Akber Saifee
d86cf66101
Move WITHATTRIBS token from vlinks to vsim (#14194)
# Description
The `WITHATTRIBS` token was incorrectly documented under the `vlinks`
command in #14065
2025-07-16 20:17:53 +08:00
Salvatore Sanfilippo
b5d54866ac
[Vector sets] Endianess fix and speedup of data loading (#14144)
Hello, this is a patch that improves vector sets in two ways:

1. It makes the RDB format compatible with big endian machines: yeah,
they are non existent nowadays, but still it is better to be correct.
The behavior remains unchanged in little endian systems, it only changes
what happens in big endian systems in order for it to load and emit the
exact same format produced by little endian. The implementation was
*already largely safe* but for one detail.

2. More importantly, this PR saves nodes worst link score / index in a
backward compatible way, introducing also versioning information for the
serialized node encoding, that could be useful in the future. With this
information, that in the past was not saved for a programming error
(mine), there is no longer need to compute the worst link info at
runtime when loading data. This results in a speed improvement of about
30% when loading data from disk / RESTORE. The saving performance is
unaffected.

The patch was tested with care to be sure that data produced with old
vector sets implementations are loaded without issues (that is, the
backward compatibility was hand-tested). The new code is tested by the
persistence test already in the test suite, so no new test was added.
2025-07-10 10:08:59 +08:00
Ali-Akber Saifee
92e39cac96
Fix version for vector set commands.json (#14005)
# Description 

Update `since` for all vector set commands from `1.0.0` to `8.0.0`
2025-07-08 16:32:00 +08:00
adamiBs
9ff8ade64a
Fix incorrect Rust 1.88.0 SHA256 checksums in modules/Makefile (#14176)
The SHA256 checksums for Rust 1.88.0 were incorrect, causing checksum
verification failures during installation. Updated with the correct
official checksums from https://static.rust-lang.org/dist/:

- x86_64-unknown-linux-gnu:
7b5437c1d18a174faae253a18eac22c32288dccfc09ff78d5ee99b7467e21bca
- x86_64-unknown-linux-musl:
200bcf3b5d574caededba78c9ea9d27e7afc5c6df4154ed0551879859be328e1
- aarch64-unknown-linux-gnu:
d5decc46123eb888f809f2ee3b118d13586a37ffad38afaefe56aa7139481d34
- aarch64-unknown-linux-musl:
f8b3a158f9e5e8cc82e4d92500dd2738ac7d8b5e66e0f18330408856235dec35
2025-07-06 22:04:50 +03:00
Jonas Kruckenberg
17ffb1ab80
chore: Rust version bump to 1.88 (#14167)
Simple version bump from Rust 1.87 to Rust 1.88 to make nightly build
again.
2025-07-06 14:44:40 +03:00
Eran Hadad
a7d91145c0
Update Bloom, TS, and JSON Modules to Version 8.1.90 (#14160) 2025-07-02 22:13:39 +03:00
alonre24
2826fc834a
Update redisearch to 8.2 RC1 (#14159)
[#Q6329](https://github.com/RediSearch/RediSearch/pull/6329),
[#Q6329](https://github.com/RediSearch/RediSearch/pull/6394) -
Introducing the new SVS-VAMANA vector index type which supports vector
compression (optimized on Intel machines)
2025-07-02 22:10:42 +03:00
Salvatore Sanfilippo
8948a5d2b2
[Vector Sets] IN operator for string/string operands (#14122)
This PR introduces "IN" overloading for strings in Vector Sets VSIM
FILTER expressions.
Now it is possible to do something like:

    "foo" IN "foobar"

IN continues to work as usually if the second operand is an array,
checking for membership of the left operand.

Ping @rowantrollope that requested this feature. I'm evaluating if to
add glob matching functionalities via the `=~` operator but I need to do
an optimization round in our glob matching function probably. Glob
matching can be slower, at the same time the complexity of the greedy
search in the graph remains unchanged, so it may be a good idea to have
it.

Case insensitive search will be likely not be added however, since this
would require handling unicode that is kinda outside the scope of Redis
filters. The user is still able to perform `"foo" in "foobar" || "FOO"
in "foobar"` at least.
2025-06-26 10:13:54 +08:00
Salvatore Sanfilippo
f6d1fd08f9
Vset tests improvements (#14089)
This changes improve a bit the Vector Sets tests:

* DB9 is used instead of the target DB. After a successful test the DB
is left empty.
* If the replica is not available, the replication tests are skipped
without errors but just a warning.
* Other refactoring stuff.
2025-06-18 10:23:22 +08:00
lerman25
a8cde7d19c
Fix alpine missing __STRING #define (#14133)
Alpine Linux doesn't provide the  __STRING macro, causing build failure:
Adding conditional define the macro if not already available.
2025-06-17 21:50:35 +08:00
lerman25
94aebb7324
Add config base to vector-sets and hnsw thread config (#14082)
This PR introduces the initial configuration infrastructure for
vector-sets, along with a new option:
`vset-force-single-threaded-execution`. When enabled, it applies the
`NOTHREAD` flag to VSIM and disables the `CAS` option for VADD, thereby
enforcing single-threaded execution.
Note: This mode is not optimized for single-threaded performance.

---------

Co-authored-by: GuyAv46 <47632673+GuyAv46@users.noreply.github.com>
Co-authored-by: debing.sun <debing.sun@redis.com>
2025-06-16 10:06:43 +08:00
Alexander Dobrzhansky
b1d202fb23
Bump rust version for INSTALL_RUST_TOOLCHAIN flag (#14118)
Updates the rust version that is getting installed if
`INSTALL_RUST_TOOLCHAIN` is defined
2025-06-12 11:50:24 +03:00
Salvatore Sanfilippo
27dd3b71ce
Vector Sets fixes against corrupted data in absence of checksum verification (#14102)
Vector Sets deserialization was not designed to resist corrupted data,
assuming that a good checksum would mean everything is fine. However
Redis allows the user to specify extra protection via a specific
configuration option.

This commit makes the implementation more resistant, at the cost of some
slowdown. This also fixes a serialization bug that is unrelated (and has
no memory corruption effects) about the lack of the worst index /
distance serialization, that could lower the quality of a graph after
links are replaced. I'll address the serialization issues in a new PR
that will focus on that aspect alone (already work in progress).

The net result is that loading vector sets is, when the serialization of
worst index/distance is missing (always, for now) 100% slower, that is 2
times the loading time we had before. Instead when the info will be
added it will be just 10/15% slower, that is, just making the new sanity
checks.

It may be worth to export to modules if advanced sanity check if needed
or not. Anyway most of the slowdown in this patch comes from having to
recompute the worst neighbor, since duplicated and non reciprocal links
detection was heavy optimized with probabilistic algorithms.

---------

Co-authored-by: debing.sun <debing.sun@redis.com>
2025-06-10 21:55:09 +08:00
alonre24
2ba81b7095
Bump search version to 8.1.00 (#14110) 2025-06-08 16:24:52 +03:00
Eran Hadad
38a8894b50
Update TS, JSON and Bloom Modules to 8.1.00 (#14109) 2025-06-08 16:24:19 +03:00
Salvatore Sanfilippo
0ac822e154
Implement WITHATTRIBS for VSIM. (#14065)
Hi, as described, this implements WITHATTRIBS, a feature requested by a
few users, and indeed needed.
This was requested the first time by @rowantrollope but I was not sure
how to make it work with RESP2 and RESP3 in a clean way, hopefully
that's it.

The patch includes tests and documentation updates.
2025-05-27 22:12:48 +08:00
Salvatore Sanfilippo
65e164caff
[Vector sets] More rdb loading fixes (#14032)
Hi all, this PR fixes two things:

1. An assertion, that prevented the RDB loading from recovery if there
was a quantization type mismatch (with regression test).
2. Two code paths that just returned NULL without proper cleanup during
RDB loading.
2025-05-12 21:57:38 +03:00