Skip to content

Commit

Permalink
Merge pull request #46 from zopefoundation/do3cc_fix_for45
Browse files Browse the repository at this point in the history
Fixing uncaught exception problem on shutdown
  • Loading branch information
tseaver committed Mar 17, 2016
2 parents b28a24c + 0089255 commit b988767
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ include
build
*.so
parts
*.pyc
.eggs
*.egg-info
4 changes: 4 additions & 0 deletions src/CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ Bugs Fixed
- Pinned the ``transaction`` and ``manuel`` dependencies to 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)
===================

Expand Down
3 changes: 2 additions & 1 deletion src/ZODB/Connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -1073,7 +1073,8 @@ def _resetCache(self):
def _release_resources(self):
for c in self.connections.itervalues():
if c._mvcc_storage:
c._storage.release()
if c._storage is not None:
c._storage.release()
c._storage = c._normal_storage = None
c._cache = PickleCache(self, 0, 0)

Expand Down
11 changes: 10 additions & 1 deletion src/ZODB/tests/testMVCCMappingStorage.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,15 @@
)

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):
# Verify connections see updated state at txn boundaries.
Expand Down Expand Up @@ -122,7 +131,7 @@ def checkCrossConnectionIsolation(self):
self.assert_(r2['gamma']['delta'] == 'yes')
finally:
db.close()


class MVCCMappingStorageTests(
StorageTestBase.StorageTestBase,
Expand Down

0 comments on commit b988767

Please sign in to comment.