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

Use semaphore from the storage module #664

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

pedro-rosario
Copy link
Contributor

@pedro-rosario pedro-rosario commented May 28, 2019

Closes #606

TODO:

  • Feature description
  • Documentation
  • Tests

@coveralls
Copy link

coveralls commented May 29, 2019

Pull Request Test Coverage Report for Build 2342

  • 2 of 2 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.02%) to 99.978%

Totals Coverage Status
Change from base Build 2339: -0.02%
Covered Lines: 4033
Relevant Lines: 4033

💛 - Coveralls

@pedro-rosario pedro-rosario changed the title [WIP] Use semaphore from the storage module Use semaphore from the storage module May 29, 2019
@amelvisfranco
Copy link
Contributor

amelvisfranco commented May 31, 2019

Semaphore

.then(() => internalBootstrap(bootstrap))
.then(() =>
db.applyLock
? db.applyLock('bootstrap', internalBootstrap)
Copy link
Member

Choose a reason for hiding this comment

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

Looks good, but I'd like to get some clarity on this pattern.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was a suggestion to avoid breaking changes:
If the storage module has an applyLock method, we use it.
If it doesn't, we execute the bootstrap as before (using the bootstrap boolean that comes from the configuration)

@pedro-rosario pedro-rosario added the 8.x Breaking changes for the next major version of Amphora label Jun 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.x Breaking changes for the next major version of Amphora
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Startup Semaphore
4 participants