more commit-aside problems
[email protected] Tue, 09 May 2006 20:16:20 -0300
| Newsgroups | gmane.comp.db.metakit |
|---|---|
| Message-ID | <[email protected]> |
------- Forwarded Message From: Jim McCoy <[email protected]> Date: May 4, 2006 12:06:49 PM PDT To: [email protected] Subject: Update on the commit-aside crash After further poking around we discovered another problem using commit-aside in Python. If you have a view that has a binary B property then some part of the full commit does not seem to work. If the view has no B properties then we can do a full commit and nuke the aside file with no consequences, but if there is a B property we can reliably crash the python process due to something in Mk4py.dll exploding. The following code snippet should recreate the problem. import metakit, random, os db = metakit.storage("_f.mk", 1) dba = metakit.storage("_f.mka", 1) db.aside(dba) vw = db.getas("a[i:I,b:B]") vw.append(i=1,b=random.getrandbits(32)) vw.append(i=2, b=random.getrandbits(32)) vw.append(i=3, b=random.getrandbits(32)) dba.commit() db.commit(1) del vw del db del dba os.remove("_f.mka") db = metakit.storage("_f.mk", 1) dba = metakit.storage("_f.mka", 1) db.aside(dba) vw = db.getas("a") assert len(vw) == 3 # and now to crash things assert vw[0].i == 1 If none of the view properties are binary then everything will work as expected (modulo the "open the views before trying a full commit" bit Zooko noted) but with a binary property in the mix then as soon as we try to use the re-opened views after doing a full commit and nuking the aside file everything comes crashing down. Regards, Jim McCoy _____________________________________________ Metakit mailing list - [email protected] http://www.equi4.com/mailman/listinfo/metakit