Skip to content
This repository has been archived by the owner on Jul 25, 2024. It is now read-only.

using atomic transactions #69

Merged
merged 1 commit into from
Sep 28, 2023
Merged

using atomic transactions #69

merged 1 commit into from
Sep 28, 2023

Conversation

aramikm
Copy link
Collaborator

@aramikm aramikm commented Sep 28, 2023

Description

To be able to eliminate partial failures as much as possible we need to use transactions as much as possible. This was not easily achievable when we have a mix of redis operations and bullmq jobs. Since bullmq jobs use lua scripts to publish it seems like it is not possible to wrap them inside a transaction and need to be careful about the order of operations and side-effects.

When we have only redis operations the best way to achieve atomicity is to use lua scripts which is what we are doing for batching.

closes #29

Copy link
Collaborator

@saraswatpuneet saraswatpuneet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@rlaferla rlaferla changed the title using atmoic transactions using atomic transactions Sep 28, 2023
@aramikm aramikm merged commit b46a7e9 into main Sep 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make redis and queue operations transactional
2 participants