File tree Expand file tree Collapse file tree
Plan/common/src/main/java/com/djrapitops/plan/storage/database/transactions Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -103,10 +103,11 @@ private void manageFailure(SQLException statementFail) {
103103
104104 // Retry if deadlock occurs.
105105 int errorCode = statementFail .getErrorCode ();
106+ boolean mysqlOutdatedRead = dbType == DBType .MYSQL && errorCode == 1020 ;
106107 boolean mySQLDeadlock = dbType == DBType .MYSQL && errorCode == 1213 ;
107108 boolean deadlocked = mySQLDeadlock || statementFail instanceof SQLTransactionRollbackException ;
108109 boolean lockWaitTimeout = errorCode == 1205 ;
109- if (deadlocked || lockWaitTimeout && attempts < ATTEMPT_LIMIT ) {
110+ if (mysqlOutdatedRead || deadlocked || lockWaitTimeout && attempts < ATTEMPT_LIMIT ) {
110111 executeTransaction (db ); // Recurse to attempt again.
111112 return ;
112113 }
You can’t perform that action at this time.
0 commit comments