Closed CodeZhangBorui closed 3 months ago
Closing in favor of https://github.com/WiIIiam278/HuskHomes/commit/1c644b120e02d5fea33e50698303d0ee8edc31ab for now - I'd like to monitor the effects of this change first. Can revisit if we still have issues.
Fix #658
Proper handling of table locking exceptions to prevent database disconnections.
When a table lock exception is thrown, it will attempt to retry once after 500 ms, for a total of 20 retries. Other SQLExceptions will be thrown directly to allow for handling at the upper execution stack.
Tests well on my server's production environment.
Please note that I am not a professional Java programmer, but this issue is quite serious and I urgently need to fix it on my server. Therefore, I have made an attempt to repair the code and I'm sharing my code behind the fix.
If there are any issues with my code, please make the necessary corrections. Thank you!