[ZODB-Dev] Transaction note interface

Tim Peters tim at zope.com
Tue Sep 14 18:58:42 EDT 2004


[Christian Theune]
> Ok. What I feel would be the greatest way is something like (this is all
> application specific stuff, but we are talking about UI here):

I'm not.  Seriously, I only wanted to know if there are uses for this
metadata.  There are, at least for .user and .description, and they appear
to be purely "advisory" uses.  Knowing that, ZODB never sets them itself,
except for the "initial database creation" .description on the "secret"
transaction that creates the root object in a new database.  How you'd like
to *see* this info displayed isn't a ZODB issue -- ZODB doesn't even supply
a documented way to extract this info <wink>.

>    You deleted XY, ZA and 1234 from the folder FG.
>
> When this grows too long, the application should be able to rephrase:
>
>    You deleted 3 items from folder FG.
>
> Also, I hate it that the data is written as presentation in there,
> applications should be using some own datastructure to support I18N for
> those messages ...

[... Tim, again suggests that FileStorage throw stuff out of "too long"
     .description and .user fields rather than abort the transaction ...]

> I'd think we could get away with this, but should also discuss this more
> broadly IMHO.

AFAIK, you're the only person who has bumped into this limitation, so I
don't know who else to ask.  It's a ZODB question, specifically a
FileStorage issue, relating to extreme edge case behavior.  Where would you
like to see it discussed?  Then discuss it there, and tell me the outcome
<0.6 wink>.

> I don't think configuration switches would help here. The
> main thing is that you don't want your application to die on something
> like this. :/

There are only 2 bytes in the FileStorage format to record the length.  So
we lose data here, or, as happens now, the transaction gets aborted.  Those
are the choices.  It's not conceivable that someone will volunteer the work
needed to change the FileStorage format to accommodate larger values, so
that's not a realistic option.

> What about cutting .description and sending a warning to some log file?

That's been the suggestion on the table, ditto with cutting .user, but not
cutting ._extension.  Nobody has objected to that, except *possibly* for
you.  I can't really tell about that -- for some reason this thread keeps
going without seeming to get anywhere.  Since you're the only one who
appears to be affected by it (nobody else has said it happens to them), I'm
waiting for you to say this scheme is OK for your purposes.  FileStorage
cuts the metadata, or the transaction aborts.  Pick one.  For extra credit,
contribute a patch <wink>.



More information about the ZODB-Dev mailing list