Commit Graph

12620 Commits

Author SHA1 Message Date
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
YaacovHazan cb261828bd
Merge unstable into 8.0 (#13835)
preparing for 8.0 RC1
2025-02-27 08:29:01 +02:00
YaacovHazan 9265234299 Merge remote-tracking branch 'upstream/unstable' into HEAD 2025-02-26 21:23:36 +02: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
antirez ef24ab7821 Allow decimals, exponent numbers in expressions. 2025-02-24 23:37:49 +01:00
antirez d3ada8090f Fix expression op && entry trailing space. 2025-02-24 23:37:49 +01:00
antirez 2f1d917cf1 Fix exprParseNumber() overflow check. 2025-02-24 23:37:49 +01:00
antirez 7ad3cea7fa Expr filtering: fix selector name copying. 2025-02-24 23:37:49 +01:00
antirez 5304318335 Expr filtering: VSIM FILTER first draft. 2025-02-24 23:37:49 +01:00
antirez 025790fc50 Expr filtering: implement HNSW filter in search_layer(). 2025-02-24 23:37:49 +01:00
antirez 438adc917b Expr filtering: fix initialization of attrib. 2025-02-24 23:37:49 +01:00
antirez e3a8921ab5 VSETATTR / VGETATTR. 2025-02-24 23:37:49 +01:00
antirez 2d1642504d Expr filtering: fixed a few bugs. 2025-02-24 23:37:49 +01:00
antirez 097f310797 Expr filtering: save/load attribs. 2025-02-24 23:37:49 +01:00
antirez 832090d821 Expr filtering: draft of the dual ported object. 2025-02-24 23:37:49 +01:00
antirez af6fa6f732 Expr filtering: conversions and other fixes. 2025-02-24 23:37:49 +01:00
antirez a90d2ea290 Expr filtering: first draft of exprRun(). 2025-02-24 23:37:49 +01:00
antirez 9e4413d1e3 Expr filtering: function to free tokens. 2025-02-24 23:37:49 +01:00
antirez c6bd5d3542 Expr filtering: int error offset + selector fix. 2025-02-24 23:37:49 +01:00
antirez f9d4a5c435 Expr filtering: first compilation draft. 2025-02-24 23:37:49 +01:00
antirez 56bc353717 Expr filtering: separate tokenization from compiling. 2025-02-24 23:37:49 +01:00
antirez 6ad37b6550 Expression filtering: parsing WIP. 2025-02-24 23:37:49 +01:00
antirez 710f70f963 Make allocators func pointers private to HNSW. 2025-02-24 23:37:49 +01:00
antirez 90c2349b35 HNSW: binary distance: fix type for the xor var. 2025-02-24 23:34:18 +01:00
antirez 92dcfeae8b HNSW: don't free layers, now is part of the node itself. 2025-02-24 23:32:51 +01:00