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

Wait to acquire row lock before checking if record can be deleted. #2965


Copy link

@notbakaneko notbakaneko commented Apr 11, 2018

It should be waiting for status to finish committing, otherwise it's doing the check with an old value and then queueing the delete anyway

@notbakaneko notbakaneko force-pushed the notbakaneko:feature/store/lock-row-before-checking-modifiable branch from 5ba53f5 to f074785 Apr 11, 2018
// would return a new cart anyway?
throw new Exception("Delete not allowed on Order ({$this->getKey()}).");
DB::connection($this->connection)->transaction(function () {

This comment has been minimized.


nanaya Apr 11, 2018

$this->getConnection()->transaction(...) looks like the same thing.

This comment has been minimized.


notbakaneko Apr 11, 2018
Author Collaborator

making a separate PR for the existing ones

nanaya approved these changes Apr 12, 2018
@nanaya nanaya merged commit 09a84f8 into ppy:master Apr 12, 2018
2 checks passed
2 checks passed
continuous-integration/styleci/pr The analysis has passed
continuous-integration/travis-ci/pr The Travis CI build passed
@notbakaneko notbakaneko deleted the notbakaneko:feature/store/lock-row-before-checking-modifiable branch Apr 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants