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

Create new Service for Doctrine causes race condition #12

Open
weierophinney opened this issue Dec 31, 2019 · 2 comments
Open

Create new Service for Doctrine causes race condition #12

weierophinney opened this issue Dec 31, 2019 · 2 comments

Comments

@weierophinney
Copy link
Contributor

When using Doctrine and creating a new service if more than one entity is selected a race condition occurs when both entities are submitted to be created. This is caused because creating a new resource invokes code generation and the two jobs are submitted simultaneously.

The jobs should use a promise object to run one at a time.

p.s. I thought this was already reported. It's been around forever.


Originally posted by @TomHAnderson at zfcampus/zf-apigility-admin-ui#109

@weierophinney
Copy link
Contributor Author

Given the recent uptick in Doctrine contribution to Apigility I would like to bump this up to a higher priority.

ping @jguittard


Originally posted by @TomHAnderson at zfcampus/zf-apigility-admin-ui#109 (comment)

@TomHAnderson
Copy link
Contributor

For anyone needing a work-around, and you choose to create all your Doctrine endpoints at the same time, you may run the application through the php internal server php -S localhost:8080 -t public public which is single threaded and will not cause a race condition.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants