Commit Graph

137 Commits

Author SHA1 Message Date
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 08e3f958fa README: remove no longer valid RP issue.
now the projection matrix is deterministic.
2025-03-26 11:33:32 +01:00
antirez 23b3e21817 README: suggest using FP32 vs VALUES. 2025-03-26 11:28:05 +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 958ebee091 README: specify how to add REDUCE in VADD. 2025-03-24 09:55:45 +01:00
antirez 8007ccd51b Use RESP3-friendly bool replies. 2025-03-23 20:14:40 +01:00
antirez 9cc750fd66 Test: projection regression test fixed. 2025-03-23 15:04:58 +01:00
antirez aa92b37589 VINFO: use a single field for random projection info. 2025-03-23 14:49:52 +01:00
antirez 8f479b22b9 Tests: replication test. 2025-03-23 14:45:34 +01:00
Salvatore Sanfilippo 854c7fdddb
Merge pull request #6 from rowantrollope/main
Fix possible crash with random projection
2025-03-23 14:44:53 +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 758e963a4e VRANDMEMBER documentation. 2025-03-19 09:02:15 +01: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
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
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 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