Shared/Database: Improve dead-lock error handling

Improve dead-lock error handling in async transactions by retrying the transaction for up to 60 seconds instead of just 5 times
This commit is contained in:
jackpoz authored and Aokromes committed 2018-02-10 16:16:14 +01:00
1 parent 104aa66912
commit d1df97db23
2 files changed
+22 -4

No files matched your search

@@ -238,6 +238,7 @@ void DatabaseWorkerPool<T>::DirectCommitTransaction(SQLTransaction& transaction)
/// @todo More elegant way
if (errorCode == ER_LOCK_DEADLOCK)
{
//todo: handle multiple sync threads deadlocking in a similar way as async threads
uint8 loopBreaker = 5;
for (uint8 i = 0; i < loopBreaker; ++i)
{