[Neo-report] r2134 gregory - /trunk/neo/client/pool.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Mon Jun 7 14:33:34 CEST 2010
Author: gregory
Date: Mon Jun 7 14:33:33 2010
New Revision: 2134
Log:
Fix: Disallow multiple connections from client to storage
Keep lock around _initNodeConnection() in connection pool to avoid concurrent
connections to the same storage node.
Modified:
trunk/neo/client/pool.py
Modified: trunk/neo/client/pool.py
==============================================================================
--- trunk/neo/client/pool.py [iso-8859-1] (original)
+++ trunk/neo/client/pool.py [iso-8859-1] Mon Jun 7 14:33:33 2010
@@ -106,16 +106,9 @@
# must drop some unused connections
self._dropConnections()
- self.connection_lock_release()
- try:
- conn = self._initNodeConnection(node)
- finally:
- self.connection_lock_acquire()
-
- if conn is None:
- return None
-
- self.connection_dict[node.getUUID()] = conn
+ conn = self._initNodeConnection(node)
+ if conn is not None:
+ self.connection_dict[node.getUUID()] = conn
return conn
@profiler_decorator
More information about the Neo-report
mailing list