Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Lock] Release Locks from Internal Store on Postgres waitAndSave* #45526

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

Merged
merged 1 commit into from
Feb 24, 2022

Conversation

chrisguitarguy
Copy link
Contributor

Q A
Branch? 5.4
Bug fix? yes
New feature? no
Deprecations? no
Tickets Fix #45505
License MIT
Doc PR n/a

if something goes wrong talking with the database connection (like a
disconnect or timeout) the parent Lock object will catch and simply
say that there was an error acquring the lock. However, waitAndSave and
waitAndSaveRead both store the lock in an internal store so trying to
re-acquire the lock with the same connection would result in a lock
confliected exception even though the lock was never acquired in the
first place.

This takes the fix from #44828
and applies it to the waitAndSave and waitAndSaveRead methods on both
DoctrineDbalPostgreSqlStore and PostgreSqlStore.

@carsonbot carsonbot added this to the 5.4 milestone Feb 23, 2022
@chrisguitarguy chrisguitarguy changed the title Release Locks from Internal Store on Postgres waitAndSave* [Lock] Release Locks from Internal Store on Postgres waitAndSave* Feb 23, 2022
Copy link
Member

@nicolas-grekas nicolas-grekas left a comment

Choose a reason for hiding this comment

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

LGTM thanks! I just have two minors CS notes.

@carsonbot carsonbot changed the title [Lock] Release Locks from Internal Store on Postgres waitAndSave* Release Locks from Internal Store on Postgres waitAndSave* Feb 23, 2022
@chrisguitarguy
Copy link
Contributor Author

Do I need to worry about that 8.1 low-deps check? Looks like something in the form component failed a git checkout?

@nicolas-grekas
Copy link
Member

No need to.

@carsonbot carsonbot changed the title Release Locks from Internal Store on Postgres waitAndSave* [Lock] Release Locks from Internal Store on Postgres waitAndSave* Feb 23, 2022
@nicolas-grekas
Copy link
Member

Thank you @chrisguitarguy.

@nicolas-grekas nicolas-grekas merged commit 87a1a34 into symfony:5.4 Feb 24, 2022
This was referenced Feb 28, 2022
@chrisguitarguy chrisguitarguy deleted the chrisguitarguy/45505 branch February 28, 2022 16:23
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.

3 participants