[ZODB-Dev] Transaction note interface

Tim Peters tim at zope.com
Mon Sep 13 16:40:31 EDT 2004


[Tim Peters, on auto-reducing .user and .description fields]
>> After the transaction is in the database, there's nothing in the
>> documented storage API that allows retrieving this stuff again. 
>> There are internal tools (like fsdump) that retrieve and display
>> the user and description fields via exploiting undocumented internals,
>> but AFAIK there's nothing anywhere that displays "extended info".  So
>> the transaction meta-info appears to be all in the nature of forensic
>> clues in case a database dies or goes insane.

[Christian Theune]
> Well. Zope displays the description in the Undo-Log, as does Plone, which
> is quite comfortable when having to undo stuff. Users don't want to read
> "Want to undo /root/object1235/xy/manage_delete?"

Which is why nothing in ZODB can ever be changed <0.7 wink -- "everyone"
goes outside the documented API>.  Now back to the real question:  as a user
of Zope and Plone, would you give a rip if an Undo-Log screen cut some
characters out of the middle of a description that exceeded 64K characters?
This goes back to "intended use cases", and no description that long was an
intended use (no, I don't know what the intent was, I just know a few things
it couldn't have been <wink>).  My guess is that if the first and last few
entries in a Transaction.note()'s life were preserved, nobody would care if
entries got dropped in the middle.  If the intended use is as a mnemonic aid
on a management screen, anything bigger than a line of text is "too much"
anyway -- a 10K-word document is absurd there.

> I always felt like the meta data could be used for some fancy ZODB
> enhancements ...

Apparently Jim did too, or he wouldn't have added all this stuff to begin
with.  In the meantime, it seems there are no known uses outside dump tools
and management screens, and we're still in a state where making a
description "too big" kills a transaction.  Killing a transaction seems to
me a major evil compared to cutting out characters nobody cares about
anyway.  That applies to .description and .user.  I'd still kill the
transaction if the ._extension pickle was too big (particularly since
._extension appears unused in Zope2, and used only for a few small things in
Zope3).



More information about the ZODB-Dev mailing list