Optimistic concurrency support #309
Replies: 2 comments 5 replies
-
@curquiza thanks for the help, so to reiterate the problem I am facing. One thing that is preventing me from moving from Elasticsearch to Meilisearch is the lack of optimistic concurrency. This is helpful when the document updates are done asynchronously, not directly as per user command, especially when it is driven by change data capture or projection of an event-sourced system. It does not have to be fancy, for instance, having a numeric version field that can be used to check whether the new document has a value greater than the current value or not, if it is the case replace it, otherwise fail the update. For reference, Elasticsearch has this capability under external versioning here. Checking the current version of the document on the application level does not cut it, since there might be concurrent replacement requests from another process. I am not sure how the async update is implemented in Meilisearch, but if a queue-like structure is used, maybe just drop updates with a version less than the current document version? Thanks |
Beta Was this translation helpful? Give feedback.
-
I am curious, is this kind of feature request open for contribution? |
Beta Was this translation helpful? Give feedback.
-
Because of the GitHub bug that refuses to transfer discussions, just following this feature request here: meilisearch/meilisearch#1886
Beta Was this translation helpful? Give feedback.
All reactions