RelStorage 1.1 beta 1

This release has greatly optimized packing. This time for real, I hope! 🙂

At this point, I am confident in the correctness of the pack algorithm. Version 1.0 had it right as well. However, version 1.0 was naive about just how many object states might be packed all at once. It is unwise to attempt to delete gigabytes of data in millions of rows with a single, simple delete statement; it turns out that can take multiple days to complete. Even worse is to do that while holding the commit lock.

So version 1.1 packs one transaction at a time and periodically releases the commit lock. It also has numerous other optimizations in the pack algorithm that should make packing faster and less obtrusive. So, ZODB/Zope/Plone users of the world, please take the beta release for a spin. I’ll help if you have problems with it.

Update: I did not know until now that advisory locks were only recently added to PostgreSQL.  So if you’re using PostgreSQL, at least version 8.2 is required for this beta.  I think I’ll relax that requirement before RelStorage version 1.1.

In Defense of Narrative Doctests

The Zope community likes to innovate on programming. One such innovation is to use extensive “doctests” in place of conventional code tests. This practice, like other innovations, stirs up a little controversy now and then, since it’s often not clear how widely the idea should be applied.

In that context, may I just say that the doctests for zope.wfmc are a pleasure to read. Now if this package just had a wiki-based homepage and linked online API docs, I think it would be a fine model for other packages.