noobaa-core icon indicating copy to clipboard operation
noobaa-core copied to clipboard

noobaa/core: Transaction related changes

Open aspandey opened this issue 1 year ago • 4 comments

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

aspandey avatar Mar 29 '23 11:03 aspandey

@dannyzaken

aspandey avatar Mar 29 '23 11:03 aspandey

Thanks @liranmauda for comments. This is work in progress. Will make these changes in next iteration.

aspandey avatar Mar 29 '23 11:03 aspandey

Thanks @liranmauda for comments. This is work in progress. Will make these changes in next iteration.

Yes, noticed the draft after I reviewed 🙂

liranmauda avatar Mar 29 '23 12:03 liranmauda

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.

romayalon avatar Apr 25 '23 10:04 romayalon

This PR had no activity for too long - it will now be labeled stale. Update it to prevent it from getting closed.

github-actions[bot] avatar May 30 '24 11:05 github-actions[bot]

This PR is stale and had no activity for too long - it will now be closed.

github-actions[bot] avatar Jun 30 '24 11:06 github-actions[bot]