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
merged 3 commits into from Apr 12, 2018

Conversation

2 participants
@notbakaneko
Contributor

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

nanaya Apr 11, 2018

Collaborator

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

This comment has been minimized.

@notbakaneko

notbakaneko Apr 11, 2018

Contributor

making a separate PR for the existing ones

@nanaya

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
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@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