Commit 44ff889b authored by Tres Seaver's avatar Tres Seaver

Merge pull request #2 from toutpt/master

Improve logging of issue around blob
parents c327f1c7 27870c2a
...@@ -2,6 +2,12 @@ ...@@ -2,6 +2,12 @@
Change History Change History
================ ================
4.0.0.dev (unreleased)
======================
- Include the filename in the exception message to support debugging in case
loadBlob does not find the file.
4.0.0a4 (2012-12-17) 4.0.0a4 (2012-12-17)
===================== =====================
...@@ -309,7 +315,7 @@ Bugs fixed ...@@ -309,7 +315,7 @@ Bugs fixed
their subconnections weren't cleaned up properly. their subconnections weren't cleaned up properly.
- ZEO didn't work with IPv6 addrsses. - ZEO didn't work with IPv6 addrsses.
Added IPv6 support contributed by Martin v. Löwis. Added IPv6 support contributed by Martin v. L�wis.
- A file storage bug could cause ZEO clients to have incorrect - A file storage bug could cause ZEO clients to have incorrect
information about current object revisions after reconnecting to a information about current object revisions after reconnecting to a
......
...@@ -642,7 +642,7 @@ class BlobStorageMixin(object): ...@@ -642,7 +642,7 @@ class BlobStorageMixin(object):
""" """
filename = self.fshelper.getBlobFilename(oid, serial) filename = self.fshelper.getBlobFilename(oid, serial)
if not os.path.exists(filename): if not os.path.exists(filename):
raise POSKeyError("No blob file", oid, serial) raise POSKeyError("No blob file at %s" % filename, oid, serial)
return filename return filename
def openCommittedBlobFile(self, oid, serial, blob=None): def openCommittedBlobFile(self, oid, serial, blob=None):
......
...@@ -394,7 +394,7 @@ And we shouldn't be able to read the data that we saved: ...@@ -394,7 +394,7 @@ And we shouldn't be able to read the data that we saved:
>>> blob_storage.loadBlob(blob._p_oid, s1) >>> blob_storage.loadBlob(blob._p_oid, s1)
Traceback (most recent call last): Traceback (most recent call last):
... ...
POSKeyError: 'No blob file' POSKeyError: 'No blob file at /var/blobs/0x00/0x039bfdeeb0364777.blob'
Of course the old data should be unaffected: Of course the old data should be unaffected:
...@@ -411,7 +411,7 @@ Similarly, the new object wasn't added to the storage: ...@@ -411,7 +411,7 @@ Similarly, the new object wasn't added to the storage:
>>> blob_storage.loadBlob(blob._p_oid, s2) >>> blob_storage.loadBlob(blob._p_oid, s2)
Traceback (most recent call last): Traceback (most recent call last):
... ...
POSKeyError: 'No blob file' POSKeyError: 'No blob file at /var/blobs/0x00/0x039bfdeeb0364777.blob'
.. clean up .. clean up
......
...@@ -682,6 +682,9 @@ def storage_reusable_suite(prefix, factory, ...@@ -682,6 +682,9 @@ def storage_reusable_suite(prefix, factory,
"blob_connection.txt", "blob_importexport.txt", "blob_connection.txt", "blob_importexport.txt",
"blob_transaction.txt", "blob_transaction.txt",
setUp=setup, tearDown=zope.testing.setupstack.tearDown, setUp=setup, tearDown=zope.testing.setupstack.tearDown,
checker=zope.testing.renormalizing.RENormalizing([
(re.compile(r'/.*/blobs/.*\.blob'), '<BLOB STORAGE PATH>')
]),
optionflags=doctest.ELLIPSIS, optionflags=doctest.ELLIPSIS,
)) ))
if test_packing: if test_packing:
......
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