[Zodb-checkins] CVS: ZODB3/ZEO - ClientStorage.py:

Guido van Rossum guido@python.org
Fri, 20 Dec 2002 11:13:43 -0500

Update of /cvs-repository/ZODB3/ZEO
In directory cvs.zope.org:/tmp/cvs-serv17806

Modified Files:
      Tag: ZODB3-3_1-branch
Log Message:
(Backport of 1.80)

We saw a weird crash of a test run once in _update_cache() where
self._tbuf was unexpectedly None.  The only way this can happen is
when the storage is closed (probably by a different thread); close()
sets _tbuf to None.  It turns out that a TransactionBuffer instance
can safely be closed more than once, so there's no need to set _tbuf
to None in the close() method.

=== ZODB3/ZEO/ClientStorage.py => ===
--- ZODB3/ZEO/ClientStorage.py:	Mon Dec  9 15:52:26 2002
+++ ZODB3/ZEO/ClientStorage.py	Fri Dec 20 11:13:42 2002
@@ -266,9 +266,7 @@
     def close(self):
         """Storage API: finalize the storage, releasing external resources."""
-        if self._tbuf is not None:
-            self._tbuf.close()
-            self._tbuf = None
+        self._tbuf.close()
         if self._cache is not None:
             self._cache = None