Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZkSync driver: cron job mutexes #978

Merged
merged 1 commit into from
Jan 28, 2021
Merged

Conversation

Wiezzel
Copy link

@Wiezzel Wiezzel commented Jan 27, 2021

If a new payment scheduling job started while a previous one had been already in progress, it would lead to database errors due to single transaction being processed twice. Introduced mutexes for payment scheduling job and payment confirmation job to avoid it.

If a new payment scheduling job started while a previous one had been
already in progress, it would lead to database errors due to single
transaction being processed twice. Introduced mutexes for payment
scheduling job and payment confirmation job to avoid it.

Signed-off-by: Adam Wierzbicki <awierzbicki@golem.network>
@Wiezzel Wiezzel added bug Something isn't working alpha.4 labels Jan 27, 2021
@Wiezzel Wiezzel self-assigned this Jan 27, 2021
@Wiezzel Wiezzel requested a review from a team January 27, 2021 16:20
Copy link
Contributor

@maaktweluit maaktweluit left a comment

Choose a reason for hiding this comment

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

LGTM!

One thought: maybe we should have one lock for both jobs to ensure they are not running at the same time?

Still approving!

@Wiezzel
Copy link
Author

Wiezzel commented Jan 28, 2021

I believe these two jobs should not interfere. They don't in zkSync driver at least.

@Wiezzel Wiezzel merged commit 7292db4 into release/v0.6 Jan 28, 2021
@Wiezzel Wiezzel deleted the wiezzel/zksync_job_lock branch January 28, 2021 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants