We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The ID generators are not using executeQuery() instead of query. But executeQuery does not guarantee that the primary connection is used (on purpose) and the id is generated on persist, so before starting the flush transaction. See https://github.com/doctrine/dbal/blob/141daa53e4f717a9ca234182b81179f9d1a573d5/src/Connections/PrimaryReadReplicaConnection.php#L36-L56
executeQuery()
query
executeQuery
In 2.9 and older, the id generators (I'm using the SequenceGenerator in my case) were using query() and so were automatically switching to the primary
query()
Reading the next val of the sequence is done on the read replica, which fails as that action cannot be performed with read-only priviledges.
The text was updated successfully, but these errors were encountered:
Commit from https://github.com/doctrine/orm/pull/8794/files#r762331392
Sorry, something went wrong.
Would you be able to work on a fix?
Fixed by #9239
No branches or pull requests
BC Break Report
Summary
The ID generators are not using
executeQuery()
instead ofquery
. ButexecuteQuery
does not guarantee that the primary connection is used (on purpose) and the id is generated on persist, so before starting the flush transaction. See https://github.com/doctrine/dbal/blob/141daa53e4f717a9ca234182b81179f9d1a573d5/src/Connections/PrimaryReadReplicaConnection.php#L36-L56Previous behavior
In 2.9 and older, the id generators (I'm using the SequenceGenerator in my case) were using
query()
and so were automatically switching to the primaryCurrent behavior
Reading the next val of the sequence is done on the read replica, which fails as that action cannot be performed with read-only priviledges.
How to reproduce
The text was updated successfully, but these errors were encountered: