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

Prevent race conditions when cancelling service operations #2689

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

philippthun
Copy link
Member

@philippthun philippthun commented Feb 18, 2022

wip...

  • A short explanation of the proposed change:

  • An explanation of the use cases your change solves

  • Links to any other associated PRs

  • I have reviewed the contributing guide

  • I have viewed, signed, and submitted the Contributor License Agreement

  • I have made this pull request to the main branch

  • I have run all the unit tests using bundle exec rake

  • I have run CF Acceptance Tests

@philippthun philippthun force-pushed the prevent-race-conditions-when-cancelling-service-operations branch 14 times, most recently from 5a44b7d to 3c98a32 Compare February 25, 2022 11:28
The CreateBindingAsyncJob processes service credential bindings, service
keys and service route bindings. There can be race conditions when a
delete has been successful just before the polling times out or the
entire job expires.

Add tests to the 'create binding job' shared examples to simulate the
scenarios outlined above. The resource being gone results in a
Sequel::NoExistingObject exception that is now caught and logged.

Furthermore the database resource is only loaded once per job execution
(resulting in less database queries) and reloaded when needed.
@philippthun philippthun force-pushed the prevent-race-conditions-when-cancelling-service-operations branch from 3c98a32 to e5be915 Compare February 25, 2022 12:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants