Commit b9887679 authored by Tres Seaver's avatar Tres Seaver

Merge pull request #46 from zopefoundation/do3cc_fix_for45

Fixing uncaught exception problem on shutdown
parents b28a24c4 00892553
...@@ -5,3 +5,6 @@ include ...@@ -5,3 +5,6 @@ include
build build
*.so *.so
parts parts
*.pyc
.eggs
*.egg-info
...@@ -18,6 +18,10 @@ Bugs Fixed ...@@ -18,6 +18,10 @@ Bugs Fixed
- Pinned the ``transaction`` and ``manuel`` dependencies to Python 2.5- - Pinned the ``transaction`` and ``manuel`` dependencies to Python 2.5-
compatible versions when installing under Python 2.5. compatible versions when installing under Python 2.5.
- Avoid failure during cleanup of nested databases that provide MVCC
on storage level (Relstorage).
https://github.com/zopefoundation/ZODB/issues/45
3.10.5 (2011-11-19) 3.10.5 (2011-11-19)
=================== ===================
......
...@@ -1073,7 +1073,8 @@ class Connection(ExportImport, object): ...@@ -1073,7 +1073,8 @@ class Connection(ExportImport, object):
def _release_resources(self): def _release_resources(self):
for c in self.connections.itervalues(): for c in self.connections.itervalues():
if c._mvcc_storage: if c._mvcc_storage:
c._storage.release() if c._storage is not None:
c._storage.release()
c._storage = c._normal_storage = None c._storage = c._normal_storage = None
c._cache = PickleCache(self, 0, 0) c._cache = PickleCache(self, 0, 0)
......
...@@ -33,6 +33,15 @@ from ZODB.tests import ( ...@@ -33,6 +33,15 @@ from ZODB.tests import (
) )
class MVCCTests: class MVCCTests:
def checkClosingNestedDatabasesWorks(self):
# This tests for the error described in
# https://github.com/zopefoundation/ZODB/issues/45
db1 = DB(self._storage)
db2 = DB(None, databases=db1.databases, database_name='2')
db1.open().get_connection('2')
db1.close()
db2.close()
def checkCrossConnectionInvalidation(self): def checkCrossConnectionInvalidation(self):
# Verify connections see updated state at txn boundaries. # Verify connections see updated state at txn boundaries.
...@@ -122,7 +131,7 @@ class MVCCTests: ...@@ -122,7 +131,7 @@ class MVCCTests:
self.assert_(r2['gamma']['delta'] == 'yes') self.assert_(r2['gamma']['delta'] == 'yes')
finally: finally:
db.close() db.close()
class MVCCMappingStorageTests( class MVCCMappingStorageTests(
StorageTestBase.StorageTestBase, StorageTestBase.StorageTestBase,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment