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

Make Coordinator Fully Transactional #117

Merged
merged 3 commits into from
Aug 24, 2020

Conversation

patrick-ogrady
Copy link
Contributor

Related Issue: coinbase/mesh-cli#112

This PR makes the entire coordinator transactional to avoid race conditions when processing a job and to allow easy rollback of intermediate state changes in the case of failure.

Changes

  • Protect from panic when committing same database transaction twice
  • Make helper and job storage utilize transactions for all calls

@patrick-ogrady patrick-ogrady changed the title Make Coordinator Transactional Make Coordinator Fully Transactional Aug 24, 2020
@patrick-ogrady patrick-ogrady force-pushed the patrick/transactional-coordinator branch from 062aca5 to 7eeb2a7 Compare August 24, 2020 22:02
@coveralls
Copy link

coveralls commented Aug 24, 2020

Pull Request Test Coverage Report for Build 5090

  • 37 of 38 (97.37%) changed or added relevant lines in 4 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.01%) to 76.714%

Changes Missing Coverage Covered Lines Changed/Added Lines %
constructor/executor/worker.go 16 17 94.12%
Totals Coverage Status
Change from base Build 5004: -0.01%
Covered Lines: 4520
Relevant Lines: 5892

💛 - Coveralls

@patrick-ogrady patrick-ogrady merged commit c4fdc43 into master Aug 24, 2020
@patrick-ogrady patrick-ogrady deleted the patrick/transactional-coordinator branch August 24, 2020 22:11
@patrick-ogrady patrick-ogrady mentioned this pull request Aug 24, 2020
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants