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

Change the lock mode in the "Aggregate Fields" cookbook (aggregate-fields.rst) article. #11344

Merged
merged 1 commit into from
Oct 24, 2024

Conversation

d-ph
Copy link
Contributor

@d-ph d-ph commented Mar 8, 2024

Change PESSIMISTIC_READ to PESSIMISTIC_WRITE because otherwise the solution to the race condition at the bottom of the article would allow concurrent reads, which would not solve the presented race condition problem.

Please correct me if I'm wrong because I might be.

Change `PESSIMISTIC_READ` to `PESSIMISTIC_WRITE`. Otherwise, the solution to the race condition at the bottom of the article would allow concurrent reads, which would not solve the presented race condition problem.
greg0ire
greg0ire previously approved these changes Mar 9, 2024
Copy link
Member

@greg0ire greg0ire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks consistent with https://www.doctrine-project.org/projects/doctrine-orm/en/3.1/reference/transactions-and-concurrency.html#pessimistic-locking, which mentions that write acts at the database level. It's not completely clear at what level read acts. I'd check the implementation if I wasn't on my phone.

Copy link
Contributor

There hasn't been any activity on this pull request in the past 90 days, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 7 days.
If you want to continue working on it, please leave a comment.

@github-actions github-actions bot added the Stale label Oct 16, 2024
@greg0ire greg0ire changed the base branch from 3.1.x to 3.3.x October 17, 2024 15:53
@greg0ire greg0ire dismissed their stale review October 17, 2024 15:53

The base branch was changed.

@github-actions github-actions bot removed the Stale label Oct 18, 2024
@greg0ire greg0ire added this to the 3.3.1 milestone Oct 24, 2024
@greg0ire greg0ire merged commit 44fa8bb into doctrine:3.3.x Oct 24, 2024
1 check passed
@greg0ire
Copy link
Member

Thanks @d-ph !

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.

4 participants