[Zodb-checkins] SVN: ZODB/branches/jim-thready/src/ZEO/StorageServer.py Make an assertion mor einformative.
Jim Fulton
jim at zope.com
Sun Jan 24 14:02:32 EST 2010
Log message for revision 108445:
Make an assertion mor einformative.
Close clients before closing storages to avoid a test race, but
otherwise makes sense.
Changed:
U ZODB/branches/jim-thready/src/ZEO/StorageServer.py
-=-
Modified: ZODB/branches/jim-thready/src/ZEO/StorageServer.py
===================================================================
--- ZODB/branches/jim-thready/src/ZEO/StorageServer.py 2010-01-24 18:42:15 UTC (rev 108444)
+++ ZODB/branches/jim-thready/src/ZEO/StorageServer.py 2010-01-24 19:02:32 UTC (rev 108445)
@@ -425,7 +425,7 @@
def tpc_finish(self, id):
if not self._check_tid(id):
return
- assert self.locked
+ assert self.locked, "finished called wo lock"
self.stats.commits += 1
self.storage.tpc_finish(self.transaction, self._invalidate)
@@ -1176,8 +1176,6 @@
self.dispatcher.close()
if self.monitor is not None:
self.monitor.close()
- for storage in self.storages.values():
- storage.close()
# Force the asyncore mainloop to exit by hackery, i.e. close
# every socket in the map. loop() will return when the map is
# empty.
@@ -1187,6 +1185,8 @@
except:
pass
asyncore.socket_map.clear()
+ for storage in self.storages.values():
+ storage.close()
def close_conn(self, conn):
"""Internal: remove the given connection from self.connections.
More information about the Zodb-checkins
mailing list