Use isRetryable to catch retryable exceptions#45768
Merged
Conversation
ca56968 to
0270aad
Compare
Signed-off-by: Louis Chemineau <louis@chmn.me>
0270aad to
a93d3a5
Compare
mgallien
requested changes
Jun 11, 2024
Contributor
mgallien
left a comment
There was a problem hiding this comment.
does not work
exception below
{
"reqId": "NUQ2oEs9xatUlVpYSuAD",
"level": 3,
"time": "2024-06-11T16:15:44+00:00",
"remoteAddr": "192.168.21.4",
"user": "john",
"app": "webdav",
"method": "MOVE",
"url": "/remote.php/dav/trashbin/john/trash/bigFolder3.d1718122530",
"message": "An exception occurred while executing a query: SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction",
"version": "26.0.13",
"exception": {
"Exception": "Doctrine\\DBAL\\Exception\\DeadlockException",
"Message": "An exception occurred while executing a query: SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction",
"Code": 1213,
"Trace": [
{
"file": "/var/www/html/3rdparty/doctrine/dbal/src/Connection.php",
"line": 1814,
"function": "convert",
"class": "Doctrine\\DBAL\\Driver\\API\\MySQL\\ExceptionConverter",
"type": "->",
"args": [
[
"Doctrine\\DBAL\\Driver\\PDO\\Exception"
],
[
"Doctrine\\DBAL\\Query"
]
]
},
{
"file": "/var/www/html/3rdparty/doctrine/dbal/src/Connection.php",
"line": 1749,
"function": "handleDriverException",
"class": "Doctrine\\DBAL\\Connection",
"type": "->",
"args": [
[
"Doctrine\\DBAL\\Driver\\PDO\\Exception"
],
[
"Doctrine\\DBAL\\Query"
]
]
},
{
"file": "/var/www/html/3rdparty/doctrine/dbal/src/Connection.php",
"line": 1163,
"function": "convertExceptionDuringQuery",
"class": "Doctrine\\DBAL\\Connection",
"type": "->",
"args": [
[
"Doctrine\\DBAL\\Driver\\PDO\\Exception"
],
"UPDATE `oc_filecache` SET `storage` = ?, `path_hash` = MD5(CONCAT(?, SUBSTR(`path`, ?))), `path` = CONCAT(?, SUBSTR(`path`, ?)) WHERE (`storage` = ?) AND (`path` LIKE ?)",
[
3,
"files/bigFolder3",
44,
"files/bigFolder3",
44,
3,
"files\\_trashbin/files/bigFolder3.d1718122530/%"
],
[
1,
2,
1,
2,
1,
1,
2
]
]
},
{
"file": "/var/www/html/lib/private/DB/Connection.php",
"line": 295,
"function": "executeStatement",
"class": "Doctrine\\DBAL\\Connection",
"type": "->",
"args": [
"UPDATE `oc_filecache` SET `storage` = ?, `path_hash` = MD5(CONCAT(?, SUBSTR(`path`, ?))), `path` = CONCAT(?, SUBSTR(`path`, ?)) WHERE (`storage` = ?) AND (`path` LIKE ?)",
[
3,
"files/bigFolder3",
44,
"files/bigFolder3",
44,
3,
"files\\_trashbin/files/bigFolder3.d1718122530/%"
],
[
1,
2,
1,
2,
1,
1,
2
]
]
},
Contributor
Author
Are you sure? I can reproduce consistently without the PR, and I hardly get a failure with it. |
Contributor
Author
|
/backport to stable29 |
Contributor
Author
|
/backport to stable28 |
Contributor
Author
|
/backport to stable27 |
Contributor
Author
|
/backport to stable26 |
skjnldsv
approved these changes
Jun 12, 2024
This was referenced Jun 12, 2024
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I probably tested before switching to the non deprecated method
executeStatement.This method wraps the exception in a
DbalExceptionwhich provides the handyisRetryablemethod.