Design for transaction
support for Vector Search(VSS)
commands
#2912
Milestone
transaction
support for Vector Search(VSS)
commands
#2912
Problem Statement:
The purpose of this document is to suggest a high level design to implement transaction support for all vector search commands in all languages.
Prerequisites:
For implementing transactions for any module, the basic idea is to reuse the transaction class for all languages and pass it as an input to the already defined exec() function for the respective language.
Python design for JSON module transaction support:
The following diagram gives an overview of how transactions are implemented for JSON commands in the Python language:
Code reference: #2684
Node JS design for JSON module transaction support:
The difference between the design of Python and Node:
Note: Difference could be because of the way the modules are imported in the 2 languages. So, it is more of a language specific design decision.
Code reference: #2862
JAVA JSON module transaction support design:
Code reference:
#2691
GO JSON module transaction support design:
Note: For JSON module implementation for GO lang, use the file and class structure that is the best for Go lang. Don't copy directly from Node or Python. Each language has a different way of importing and therefore, we might need to design according to what is best for the Go lang user/customer.
Design for adding transaction support for Vector search (VSS) commands in all languages:
Implementation wise the design is similar to JSON module. There are few structure improvement suggestions mentioned in the above diagram for NodeJS and Python.
Examples:
Using the examples on vector search FT.CREATE documentation(https://docs.aws.amazon.com/memorydb/latest/devguide/vector-search-commands-ft.create.html) to test the commands in MULTI/EXEC transaction block from cli:
[Important] Possible issues with VSS transactions.
Special cases:
Need more documentation from Valkey side to validate/confirm these and other similar use cases.
Example for this is as follows:
You can clearly see that json_idx1 is not updated for searching and therefore below FT.SEARCH gives inconsistent search result compared to the FT.SEARCH in the transaction. Sometimes the server can also throw an error saying that the index is under construction.
NOTE: Need documentation and expected behaviour from the server side for such cases.
How to handle such cases:
Note: These are just implementation suggestions for the user/customer, but documentation behaviour from server side for such cases will definitely help.
Known issues:
Conclusion
Checklist
Additional Notes
FAQ:
No response
The text was updated successfully, but these errors were encountered: