Transactional updates?

Description

I’m building a web application where certain user-triggered operations involve mutating, updating, cross-referencing etc. several objects across several collections.

The python client exposes all those operations as independent queries to my weaviate cluster, which means that if 1 of them fail my data is left in a broken state.

Does Weaviate support transactions of any form, where I can group together related queries to ensure that they either all succeed or all fail?

If not, are there any recommended design patterns that I can follow to try and prevent getting into bad states because of sporadic (or not) errors?

Server Setup Information

  • Weaviate Server Version: 1.27
  • Deployment Method: k8s
  • Multi Node? Number of Running Nodes: 3
  • Client Language and Version: Python client, latest, async
  • Multitenancy?: No
1 Like

Hi @elias.gabriel,

That’s a good question. Currently, Weaviate doesn’t support the capability to group queries into transactions natively. However, you can implement some sort of actions, retries, or logic on your client side to mitigate the risk of broken states and ensure consistency in your operations.

Best regards,
Mohamed Shahin
Weaviate Support

Are there any suggested patterns here? If I have “operations” that query/mutate separate collections to achieve certain outcomes, and one of those queries ends up failing, implementing “undo” logic for every case in every operation seems crazy unsustainable.