Commit Graph

56 Commits

Author SHA1 Message Date
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
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
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 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
antirez 8007ccd51b Use RESP3-friendly bool replies. 2025-03-23 20:14:40 +01:00
antirez aa92b37589 VINFO: use a single field for random projection info. 2025-03-23 14:49:52 +01:00
Rowan Trollope 31bc07955c Fix possible crash with random projection 2025-03-22 09:11:20 -07:00
antirez f330d6175a Clarify HNSW_MAX_THREADS vs one thread per request. 2025-03-20 15:42:11 +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 22ce9f3fad VRANDMEMBER command implemented. 2025-03-17 23:52:15 +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 cc3874ab87 VADD CAS: fallback when thread creation fails. 2025-03-12 16:57:03 +01: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
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 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
antirez b49bc14f96 Fix README conflict. 2025-03-03 13:12:25 +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 3abc801d7a Fix leak on VSIM FILTER syntax error. 2025-02-25 16:15:33 +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 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
Rowan Trollope 914cfec777 Merge branch 'main' of https://github.com/rowantrollope/vector-sets 2025-02-16 16:31:56 +09:00
Rowan Trollope f723c65f1b Updated gitignore
Ignoring movies example files
2025-02-08 09:14:58 +09:00
antirez 6c1e55d07c VEMB RAW implemented. 2025-02-05 11:21:06 +01:00
antirez 8206c782b5 Function to get quantization name. 2025-02-05 11:07:35 +01:00
antirez e6f1667a3d Q8 option for VADD. See README update for info. 2025-02-03 13:05:40 +01:00
antirez ff20d534c6 VSIM: execute on main thread for Lua and MULTI/EXEC. 2025-02-03 11:46:01 +01:00
antirez 337fc3d6fd Don't use threaded VADD in replicas, lua, multi. 2025-02-03 11:28:48 +01:00
Rowan Trollope 285134e43d Comment said: "XXX: check explicitly that ELE was passed, not just size" however this code is in the else block after strcasecmp already was checked for ! ELE, therefore we have already validated that this is an ELE element type. REMOVED comment for clarity. 2025-02-01 10:28:24 +01:00
Rowan Trollope daea83d2cf Moved hardcoded default EF of 100 (during threaded search) to define. 2025-02-01 10:25:58 +01:00