I have managed to find a workaround to this problem. If I do the following : 1. Convert to ZODB3 format using bbb.py 2. Export the required parts of the converted database using Zope 2 (I only tried the std export - not xml) 3. Shut down Zope 2 and delete the database (data.fs,etc) file/s 4. Restart Zope 2, so it creates a new database. 5. Import the data exported in 2. the instability disappears and I am able to use the application without a problem (at least given the relatively small amount of testing so far). Note that I am unable to export the relevant parts of the database in Zope 1.10.3 as I have objects referencing each other throughout the database and the export process fails with an 'Object references self' error (although that is not strictly true - it is due to the fact that obj1 owns obj2 and obj2 has a reference to its parent - obj1 which will cause the export process to try to export obj1 twice) Would this cause the conversion process between ZODB2 and ZODB3 a problem as well and explain the instability ? Robert Leftwich PS I may be testing the boundaries of Zope as what I am writing is much closer to a traditional data entry application implemented using OO techniques rather than an interactive Web site. I wrote:
After converting a database from ZODB2 to ZODB3 format using bbb.py I have noticed that the pack no longer clears the list of undo-able transactions. The data.fs file size changes, but the list of transactions remains unchanged. If you attempt to actually undo one of these transactions, the database becomes corrupt and Zope faults on startup with the following traceback (this was after attempting to undo renaming a folder) :
Traceback (innermost last): File "C:\Program Files\Zope2\z2.py", line 369, in ? exec "import "+MODULE in {} File "<string>", line 1, in ? File "C:\PROGRA~1\Zope2\lib\python\Zope\__init__.py", line 46, in ? OFS.Application.initialize(c) File "C:\PROGRA~1\Zope2\lib\python\OFS\Application.py", line 324, in initializ e app._setObject('Control_Panel', cpl) File "C:\PROGRA~1\Zope2\lib\python\ZODB\Connection.py", line 384, in setstate p, serial = self._storage.load(oid, self._version) File "C:\PROGRA~1\Zope2\lib\python\ZODB\FileStorage.py", line 445, in load try: return self._load(oid, version, self._index, self._file) File "C:\PROGRA~1\Zope2\lib\python\ZODB\FileStorage.py", line 421, in _load pos=_index[oid] KeyError: ?
Attempts to actually use the database after packing without undoing anything result in a conflict exception on pages that update items in the database.
Similar instability occurs if you import a ZODB2 database that was packed, in fact all the previous transactions are shown in the undo list in the ZODB 3 version even though they were not visible in the 1.10.3 list !
This is on WinNT, running the z2.py (non-service) version of Zope 2.0B1, using a database from 1.10.3.
Has anyone else seen similar problems ?
Robert Leftwich
_______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org http://www.zope.org/mailman/listinfo/zope-dev
(To receive general Zope announcements, see: http://www.zope.org/mailman/listinfo/zope-announce
For non-developer, user-level issues, zope@zope.org, http://www.zope.org/mailman/listinfo/zope )