noobaa-core
noobaa-core copied to clipboard
noobaa/core: Transaction related changes
This patch makes changes to send bulk queries for multiple collections in one transaction for postgres DB. In case of failure of any query, all the bulk operations will be rollbacked.
unit test has not been added for this patch
@dannyzaken
Thanks @liranmauda for comments. This is work in progress. Will make these changes in next iteration.
Thanks @liranmauda for comments. This is work in progress. Will make these changes in next iteration.
Yes, noticed the draft after I reviewed 🙂
Hi @aspandey, As Danny said I was worried about some specific make_changes() calls that make multiple changes and the queries are not related to each other. For example, something like -
await system_store.make_changes({
update: {
buckets: buckets_updates,
accounts: accounts_updates,
pools: pools_updates,
namespace_resources: namespace_resources_updates
},
});
I just wanted to make sure we won't roll back queries for no reason because this is the side effect of making one transaction per single make_changes() call instead of per collection in a make_changes() call.
This PR had no activity for too long - it will now be labeled stale. Update it to prevent it from getting closed.
This PR is stale and had no activity for too long - it will now be closed.