-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Use isRetryable to catch retryable exceptions #45768
Conversation
ca56968
to
0270aad
Compare
Signed-off-by: Louis Chemineau <louis@chmn.me>
0270aad
to
a93d3a5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
]
]
},
Are you sure? I can reproduce consistently without the PR, and I hardly get a failure with it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
works fine
I was wrong since I still had changes from #45761
thanks
/backport to stable29 |
/backport to stable28 |
/backport to stable27 |
/backport to stable26 |
I probably tested before switching to the non deprecated method
executeStatement
.This method wraps the exception in a
DbalException
which provides the handyisRetryable
method.