Commit Graph

12574 Commits

Author SHA1 Message Date
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
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
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
antirez c8b6cbc6e1 Test: FILTER integration tests, work in progress. 2025-03-02 12:03:49 +01:00
antirez 1cb927aef6 Test: text FILTER expressions basics. 2025-02-28 17:52:46 +01:00
antirez b417685430 Expr: Allow _ in selectors. 2025-02-28 17:52:27 +01:00
antirez 89ef4c0702 Expr: convert Json bool to 1/0 numerical type. 2025-02-28 17:49:09 +01:00
antirez 2d311dbb01 Fix VLINKS after adding attributes. 2025-02-28 16:39:33 +01:00
antirez 68dccc55ad Fix CAS insertion broken when adding attributes. 2025-02-28 16:35:45 +01:00
antirez 68683e181c Add FILTER-EF option. 2025-02-28 13:05:19 +01:00
antirez ef74527d92 HNSW: binary distance: fix type for the xor var. 2025-02-27 10:13:27 +01:00
antirez f20684e7b5 HNSW: don't free layers, now is part of the node itself. 2025-02-27 10:13:27 +01:00
antirez 1a2da02db6 HNSW: calloc() -> hmalloc(). 2025-02-27 10:13:27 +01:00
Salvatore Sanfilippo 6e09e05af5
Merge pull request #3 from rowantrollope/main
Adding more files to .gitignore and removing stray .rdb file
2025-02-27 09:25:56 +01:00
debing.sun 7939ba031d
Enable the callback to be NULL for RM_DefragRedisModuleDict() and reduce the system calls of RM_DefragShouldStop() (#13830)
1) Enable the callback to be NULL for RM_DefragRedisModuleDict()
    Because the dictionary may store only the key without the value.

2) Reduce the system calls of RM_DefragShouldStop()
The API checks the following thresholds before performing a time check:
over 512 defrag hits, or over 1024 defrag misses, and performs the time
judgment if any of these thresholds are reached.

3) Added defragmentation statistics for dictionary items to cover the
associated code for RM_DefragRedisModuleDict().

4) Removed `module_ctx` from `defragModuleCtx` struct, which can be
replaced by a temporary variable.

---------

Co-authored-by: oranagra <oran@redislabs.com>
2025-02-26 20:04:29 +08:00
Rowan Trollope 2a8af82f50 Updated docs to show mutually exclusive quantization flags 2025-02-26 00:55:07 -08:00
antirez 3abc801d7a Fix leak on VSIM FILTER syntax error. 2025-02-25 16:15:33 +01:00
antirez 774c05ab55 Add cJSON library. 2025-02-25 16:06:40 +01:00
antirez 44c064c0b4 Expr: handle JSON arrays as expr tuples. 2025-02-25 16:05:28 +01:00
antirez 764fb8cc74 Expr: use attribute in test expression. 2025-02-25 12:39:36 +01:00
antirez ab06a5a058 Expr: conver to refcounting. 2025-02-25 12:38:20 +01:00
antirez 3627bbe12c Fixed a few memory handling/corruption bugs. 2025-02-25 09:43:36 +01:00
Yuan Wang f1d6542b1a
Stabilize tcl test cases (#13829)
Recently encountered some errors as bellow,

HGETEX/HSETEX with PXAT/EXAT options, after getting ttl, we calculate
current time by `[clock seconds]` that may have a delay that causes
results greater than expected.

Dismiss memory test error, now we introduced rdb-channel replication,
the full synchronization might finish before the child process exits. So
we may fail if calling `bgsave` immediately after full sync.
2025-02-25 16:31:53 +08:00
Denis Nevmerzhitskii 33f03f6fc8
Fix wrong behavior of XREAD + after last entry of stream have been removed (#13632)
Close #13628

This PR changes behavior of special `+` id of XREAD command. Now it uses
`streamLastValidID` to find last entry instead of `last_id` field of
stream object.
This PR adds test for the issue.

**Notes**

Initial idea to update `last_id` while executing XDEL seems to be wrong.
`last_id` is used to strore last generated id and not id of last entry.

---------

Co-authored-by: debing.sun <debing.sun@redis.com>
Co-authored-by: guybe7 <guy.benoish@redislabs.com>
2025-02-25 13:40:24 +08:00
Filipe Oliveira (Redis) 985bf68f34
Reduce redundant key slot calculations on expiration checks (#13796)
On high-pipeline/fast commands use-cases, expireIfNeeded can take up to
3% cpu cycles. 

This PR introduces an optimization where key expiration checks leverage
key slots to improve efficiency.

---------

Co-authored-by: debing.sun <debing.sun@redis.com>
Co-authored-by: ShooterIT <wangyuancode@163.com>
2025-02-25 11:55:30 +08:00
Moti Cohen 0200e8ada6
Fix multiple issues with "INFO KEYSIZES" (#13825)
This commit addresses several issues related to the `INFO KEYSIZES` feature:
- HyperLogLog commands: `KEYSIZES` hooks were not properly set or tested.
- HFE lazy expiration: `KEYSIZES` hooks were not properly set or tested.
- Empty DB & SYNC flow: On `blocking_async=0` flow, global `keysizes`
  histogram were not reset (can reproduced using `DEBUG RELOAD`).
- Empty string handling: Fix histogram for strings of size 0. Not 
  relevant to other data-types.
2025-02-25 00:38:44 +02:00
antirez de32f40b98 Expr: fix pow associativeness and alloc size. 2025-02-24 23:37:49 +01:00
antirez 3b60921c53 Expr: implement tuple, fix many stuff. 2025-02-24 23:37:49 +01:00
antirez a9e02dfd29 Expr: add strdup alias for stand-alone build. 2025-02-24 23:37:49 +01:00
antirez e66a50ec3c Expr: remove useless allocation checks + fix leak. 2025-02-24 23:37:49 +01:00