This repository has been archived by the owner on Sep 24, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed serious flaw with connection retrials
There was bug in reconnect logic. Retries were only performed if operation attempt failes synchrnously. However typically this is not the case. The most obvouis case for reconnects is when database server restarts. However client does not detects that server went await up until `connection.poll()`. I.e. `cursor.execute` finishes successfully. Unfortunately in such cases Momoko simply progated the error to the caller, practically rendering reconnection code useless. The bug existed primarily to the fact, that I did not find a good and simple way to simulate sever going away and coming back in my unitests. Now I've integrated third-party tcproxy package that I launch and restart when needed from unittest code. So finally, I have all the tools to fix and verify all reconnection logic.
- Loading branch information
Showing
4 changed files
with
155 additions
and
44 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.