[ZODB-Dev] TmpStore missing loadBefore

Sidnei da Silva sidnei at enfoldsystems.com
Sun Jun 26 12:49:30 EDT 2005


On Sun, Jun 26, 2005 at 12:27:57PM -0400, Tim Peters wrote:
| This was fixed a few weeks, in rev 30825:
| 
|     http://svn.zope.org/ZODB/branches/3.4/?rev=30825&view=rev

Ah, there we go. So that was fixed after 3.4.0 was tagged, and Zope
2.8 branch still points to the 3.4.0 tag. Guess we need a new tag.

| If you don't care too much about the new test, it's just a matter of adding
| the string "loadBefore" to this list in TmpStore.__init__:
| 
|         for method in (
|             'getName', 'new_oid', 'modifiedInVersion', 'getSize',
|             'undoLog', 'versionEmpty', 'sortKey', 'loadBefore',
|             ):
|             setattr(self, method, getattr(storage, method))

Good, I had came to the same result with test and all *wink*. Wish I
had looked at checkins before.

| > Wouldn't it be simpler to make TmpStore subclass from FileStorage
| 
| No, because TmpStore is used by Connection (to support savepoints), and
| Connection can't make assumptions about the _kind_ of storage in use.

Humm... I don't see where the assumption would be except for a import
dependency. My fear is that TmpStore does basically what FileStorage
does but get way less attention and ends up bitrotting. This is not
the first time I've hit a (shallow) bug in TmpStore that would just be
triggered by a fairly big or long subtransaction/savepoint.

Anyway, you're probably in better position to judge this than I.

-- 
Sidnei da Silva
Enfold Systems, LLC.


More information about the ZODB-Dev mailing list