Problems with temporary connections
I need to make a temporary connection to the ZODB. I have really good reasons relating to performance and not wanting have objects in the current cache getting removed from the cache on why I don't want to make use of the connections in the pool. I can elaborate on this if really nescessary... The supposed way to get a temporary connection would be: conn = Globals.DB.open(temporary=1) which works fine. The problem is that one cannot: conn.close() as this puts the connector back into the pool, where it shouldn't go and if you do it, causes all kinds of nasty lockups, etc. I have read some old posts that advise against using temporary connectors as this can lead to memory leaks (as I can attest to after trying to use them) and that temporary connections seem to be "broken". How can I get a connector, that will not be used by other normal processes, that I can release cleanly when I am finished with it? Or at least ensure that one of the connectors in the pool is reserved for a specific process and that that connector will only be used by that process. Can I do this by giving a "version" to the connector? Any suggestions? Etienne
Etienne Labuschagne wrote at 2005-7-8 16:51 +0200:
I need to make a temporary connection to the ZODB.
Tim Peters (the current ZODB maintainer) warns against using temporary connections. And I can tell you, he is right: I had to fix about half a dozen bugs in the handling of temporary connections. You probably will not want to invest time in them because the current ZODB (3.4) has dropped support for them altogether. -- Dieter
participants (2)
-
Dieter Maurer -
Etienne Labuschagne