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

Handle lost connection during commit #4713

Merged
merged 1 commit into from
Jul 17, 2021
Merged

Conversation

morozov
Copy link
Member

@morozov morozov commented Jul 15, 2021

Q A
Type improvement
BC Break no

Fixes #4522.

The improvement relies on the breaking API changes introduced in #3486 (4.0.x) and thus cannot be backported to earlier releases as is.

TransactionTest being introduced already exists in the older branches but it looks like it was mistakenly dropped during the merge up in #3712.

@morozov morozov force-pushed the issues/4522 branch 2 times, most recently from 83718ce to ab04931 Compare July 15, 2021 15:58
@morozov morozov added this to the 4.0.0 milestone Jul 15, 2021
@morozov morozov marked this pull request as ready for review July 15, 2021 18:16
@morozov morozov requested a review from greg0ire July 15, 2021 18:16
@morozov morozov linked an issue Jul 15, 2021 that may be closed by this pull request
$this->iniSet('error_reporting', (string) (E_ALL & ~E_WARNING));

$this->expectException(ConnectionLost::class);
$this->connection->commit();
Copy link
Member

Choose a reason for hiding this comment

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

How hard would it be to also cover the rollBack scenario? Wouldn't it be a simple as calling rollBack here?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yea, I think so (assuming that the extensions report the disconnect). Let me update the test.

Copy link
Member Author

Choose a reason for hiding this comment

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

Apparently, not 🚀 . We need to fix #4718 first.

@morozov morozov merged commit 5f88806 into doctrine:4.0.x Jul 17, 2021
@morozov morozov deleted the issues/4522 branch July 17, 2021 15:52
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wrapper connection doesn't handle lost connection during commit
2 participants