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

merged 3 commits into from Apr 12, 2018


2 participants

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

// 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


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

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