Hi, I'm having a bit of a problem that looks like a 32 bit vs 64 bit issue with RelStorage, can anyone help? If I do a clean install of RelStorage and ZODB on a 32 bit Ubuntu system, I get one error when I run the tests as follows; ====================================================================== FAIL: checkPackWithMultiDatabaseReferences (__main__.MySQLTests) ———————————————————————- Traceback (most recent call last): File “/opt/Plone-3.1/Python-2.4/lib/python2.4/site-packages/ZODB3-3.8.1-py2.4-linux-i686.egg/ZODB/tests/PackableStorage.py”, line 329, in checkPackWithMultiDatabaseReferences assert(len(self._storage) == 1) AssertionError ———————————————————————- I'm not convinced this in itself is a problem. However, when I do the same on a 64 bit system I get additional errors as follows; ====================================================================== ERROR: checkPackUnlinkedFromRoot (__main__.MySQLTests) ———————————————————————- Traceback (most recent call last): File “/opt/Plone-3.1/Python-2.4/lib/python2.4/site-packages/ZODB3-3.8.1-py2.4-linux-x86_64.egg/ZODB/tests/PackableStorage.py”, line 558, in checkPackUnlinkedFromRoot tid = log[0]['id'] IndexError: list index out of range ====================================================================== ERROR: checkTransactionalUndoAfterPackWithObjectUnlinkFromRoot (__main__.MySQLTests) ———————————————————————- Traceback (most recent call last): File “/opt/Plone-3.1/Python-2.4/lib/python2.4/site-packages/ZODB3-3.8.1-py2.4-linux-x86_64.egg/ZODB/tests/TransactionalUndoStorage.py”, line 506, in checkTransactionalUndoAfterPackWithObjectUnlinkFromRoot tid = log[0]['id'] IndexError: list index out of range ====================================================================== FAIL: checkLoadBefore (__main__.MySQLTests) ———————————————————————- Traceback (most recent call last): File “/opt/Plone-3.1/Python-2.4/lib/python2.4/site-packages/ZODB3-3.8.1-py2.4-linux-x86_64.egg/ZODB/tests/RevisionStorage.py”, line 62, in checkLoadBefore assert prev < middle < cur # else the snooze() trick failed AssertionError ====================================================================== FAIL: checkPackUndoLog (__main__.MySQLTests) ———————————————————————- Traceback (most recent call last): File “/opt/Plone-3.1/Python-2.4/lib/python2.4/site-packages/ZODB3-3.8.1-py2.4-linux-x86_64.egg/ZODB/tests/PackableStorage.py”, line 629, in checkPackUndoLog self.assertEqual(1,len(self._storage.undoLog())) AssertionError: 1 != 0 ====================================================================== FAIL: checkPackWithMultiDatabaseReferences (__main__.MySQLTests) ———————————————————————- Traceback (most recent call last): File “/opt/Plone-3.1/Python-2.4/lib/python2.4/site-packages/ZODB3-3.8.1-py2.4-linux-x86_64.egg/ZODB/tests/PackableStorage.py”, line 329, in checkPackWithMultiDatabaseReferences assert(len(self._storage) == 1) AssertionError ====================================================================== FAIL: checkTransactionalUndoAfterPack (__main__.MySQLTests) ———————————————————————- Traceback (most recent call last): File “/opt/Plone-3.1/Python-2.4/lib/python2.4/site-packages/ZODB3-3.8.1-py2.4-linux-x86_64.egg/ZODB/tests/TransactionalUndoStorage.py”, line 452, in checkTransactionalUndoAfterPack eq(len(info2), 2) AssertionError: 0 != 2 ———————————————————————- I have tried; System Python @ 2.5 and Plone Python @ 2.4.5 easy_install RelStorage and SVN RelStorage ZODB 3.8.0 and ZODB 3.8.1 All essentially give the same results. [I've tried ZODB 3.9, but you really don't want to see that one.] Can anyone point me in the right direction / suggest something else to try ??? tia Gareth.
Gareth Bult wrote:
I'm having a bit of a problem that looks like a 32 bit vs 64 bit issue with RelStorage, can anyone help?
We need to get more people to use RelStorage so more people can help. :-) This looks like a good clue:
====================================================================== FAIL: checkLoadBefore (__main__.MySQLTests) ———————————————————————- Traceback (most recent call last): File “/opt/Plone-3.1/Python-2.4/lib/python2.4/site-packages/ZODB3-3.8.1-py2.4-linux-x86_64.egg/ZODB/tests/RevisionStorage.py”, line 62, in checkLoadBefore assert prev < middle < cur # else the snooze() trick failed AssertionError
To debug this, I would add a pdb.set_trace() near this line and examine the variables when this code fails. Apparently prev >= cur, which suggests MySQL might be generating bad timestamps. Ooooh... how about this: ensure the MySQL server and the client are set to the same time zone and have synchronized clocks (using NTP), then run the tests again. If that solves the problem, then we need to add a note about clocks in the documentation. MySQL does not provide a fine grained current_timestamp() function, so RelStorage has a workaround that uses the client's timestamp instead. The workaround is disabled if the client and server are more than 60 seconds apart. I forgot to call this out in the documentation, and I would really like to find a better solution. Shane
participants (2)
-
Gareth Bult -
Shane Hathaway