[Twisted-Python] OT - adbapi, connection timeouts, mysql - OT

Phil Christensen phil at bubblehouse.org
Mon Aug 24 16:53:45 MDT 2009


On Aug 24, 2009, at 2:58 PM, Garret Heaton wrote:
> There is a solution to the reconnection issue posted here which one  
> of my friends improved upon. He wasn't on the list at the time of  
> this posting so I'm replying to this on his behalf. The improved  
> solution is:
[snip]
>             # try the interaction again
>             return adbapi.ConnectionPool._runInteraction(self,  
> interaction, *args, **kw)

The thing that would concern me is that you can get a ConnectionLost  
error for a variety of different reasons, and they might not be raised  
by the first query issued in your interaction.

I feel like I can think of any number of ways running the same series  
of queries twice would be a bad thing. I have some very important  
queries that are run inside a interaction because they do a series of  
operations in sequence. I can't use transactions because my tables are  
MyISAM.

Perhaps I'm jumping at shadows, but automatic re-querying just seems  
dangerous to me. Only the particular application knows when it's safe.

-phil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/twisted-python/attachments/20090824/46f2b990/attachment.html>


More information about the Twisted-Python mailing list