[Zodb-checkins] SVN: ZODB/branches/3.8/src/ZEO/ClientStorage.py The
order of operations seemed odd. If we get a new connection, we
jim at zope.com
Tue Jul 8 17:50:53 EDT 2008
Log message for revision 88126:
The order of operations seemed odd. If we get a new connection, we
should close the old connection, and mark ourselves dissconnected --
or so it seems. :) I'm chasing connection-invalidation bugs and this
rearrangement makes the logic seem a bit simpler to me and sets the
stage for a later fix for the invalidation problems.
--- ZODB/branches/3.8/src/ZEO/ClientStorage.py 2008-07-08 21:37:59 UTC (rev 88125)
+++ ZODB/branches/3.8/src/ZEO/ClientStorage.py 2008-07-08 21:50:53 UTC (rev 88126)
@@ -488,23 +488,25 @@
# this method before it was stopped.
- # invalidate our db cache
- if self._db is not None:
if self._connection is not None:
+ # If we are upgrading from a read-only fallback connection,
+ # we must close the old connection to prevent it from being
+ # used while the cache is verified against the new connection.
+ self._connection = None
reconnect = 1
reconnect = 0
- # If we are upgrading from a read-only fallback connection,
- # we must close the old connection to prevent it from being
- # used while the cache is verified against the new connection.
- if self._connection is not None:
self._connection = conn
+ # invalidate our db cache
+ if self._db is not None:
log2("Reconnected to storage: %s" % self._server_addr)
More information about the Zodb-checkins