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

Add Mutex Lock To Budget Withdrawal #1600

Closed
4 tasks
elraphty opened this issue Mar 8, 2024 · 0 comments · Fixed by #1601
Closed
4 tasks

Add Mutex Lock To Budget Withdrawal #1600

elraphty opened this issue Mar 8, 2024 · 0 comments · Fixed by #1601
Assignees
Labels
backend enhancement New feature or request go Pull requests that update Go code

Comments

@elraphty
Copy link
Contributor

elraphty commented Mar 8, 2024

Context

To avoid race conditions on the budget withdrawal, lock the Business logic to make sure only one call can be made at a time

Design

Use Golang mutex lock to lock the Business logic for each request.

Acceptance Criteria

  • I've tested on Chrome
  • I've created a test that...
  • I have rebased and tested locally before submitting my PR
  • I can submit a PR within 2 days of taking the bounty

Here is an example backend test

@elraphty elraphty added enhancement New feature or request backend go Pull requests that update Go code labels Mar 8, 2024
@elraphty elraphty self-assigned this Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend enhancement New feature or request go Pull requests that update Go code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant