Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Directly use the driverConnection executeUpdate method#37358

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fabpot merged 1 commit intosymfony:4.4fromTristanPouliquen:use-execute-update-in-messenger-doctrine-transport
Jun 25, 2020
Merged

Directly use the driverConnection executeUpdate method#37358

fabpot merged 1 commit intosymfony:4.4fromTristanPouliquen:use-execute-update-in-messenger-doctrine-transport
Jun 25, 2020

Conversation

@TristanPouliquen
Copy link
Contributor

@TristanPouliquenTristanPouliquen commentedJun 19, 2020
edited
Loading

executeUpdate & executeQuery methods do not throw a TableNotFoundException. No need for the try/catch as it is done for executeQuery

QA
Branch?4.4
Bug fix?yes
New feature?no
Deprecations?no
TicketsFix#37355
LicenseMIT

As explained in#37355, when doing a write operation, one should avoid using theexecuteQuery method of a Connection, as Doctrine's MasterSlaveConnection can pick a slave instance (usually read-only) for these operations.

tylerhcarter, christickner, and clement-fleury-assoconnect reacted with heart emoji
Copy link
Member

@derrabusderrabus left a comment

Choose a reason for hiding this comment

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

Is it possible to write a test for your scenario?

@TristanPouliquen
Copy link
ContributorAuthor

@derrabus Hey, I tried but I don't know if I can easily simulate a master-slave connection with read-only slaves easily with the CI. If you have any clue on how to proceed, I'd be happy to do it!

@derrabus
Copy link
Member

🤔 I don't have a good idea either.

@fabpot
Copy link
Member

Thank you@TristanPouliquen.

@christickner
Copy link

Thanks@TristanPouliquen

This was referencedJul 24, 2020
@TristanPouliquenTristanPouliquen deleted the use-execute-update-in-messenger-doctrine-transport branchOctober 10, 2022 12:55
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot approved these changes

@derrabusderrabusderrabus approved these changes

@srozesrozeAwaiting requested review from sroze

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

5 participants

@TristanPouliquen@derrabus@fabpot@christickner@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp