[ZODB-Dev] ZODB 3.9/3.8 incompatibility (was Re: Data.fs size grows non-stop)

Kapil Thangavelu kapil.foss at gmail.com
Thu Dec 17 13:26:31 EST 2009


On Thu, Dec 10, 2009 at 8:12 PM, Marius Gedminas <marius at gedmin.as> wrote:

> On Thu, Dec 10, 2009 at 02:07:06PM -0500, Jim Fulton wrote:
> > On Thu, Dec 10, 2009 at 1:50 PM, Marius Gedminas <marius at gedmin.as>
> wrote:
> > > On Thu, Dec 10, 2009 at 12:41:11PM -0500, Jim Fulton wrote:
> > >> On Thu, Dec 10, 2009 at 11:54 AM, Marius Gedminas <marius at gedmin.as>
> wrote:
> > >> In 3.9 for FileStorage, if you give a starting tid that is toward the
> > >> end of the file,
> > >> it will scan backward, saving a lot of time.
> > >
> > > Ah, but how can I get a valid tid that is toward the end of the file?
> > > I assume that if I give a tid that doesn't exist, I'll get an error --
> > > which is the behavior oldstate() exhibits -- rather than the next
> > > existing transaction after that timestamp, or I could fudge by getting
> > > the current timestamp and subtracting 24 hours.
> >
> > No, the iterator starts at the first transactions who's tid is >= the
> > start tid.
> >
> > So, guess a time and use repr(ZODB.TimeStamp.TimeStamp(...))
>
> Cool!  Thank you,
>
> Marius Gedminas
> --
>
>
another way is to use the fstools.prev_txn starting at the end of the file
 to grab the newest transactions, the script i send to the list last week
uses it to poke a large zodb to just get the contents of the last 20
transactions without iterating through the whole thing or guessing a
timestamp.

https://mail.zope.org/pipermail/zodb-dev/attachments/20091207/531fc1e4/attachment.obj

cheers,

kapil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zodb-dev/attachments/20091217/3ef8bd8f/attachment.html 


More information about the ZODB-Dev mailing list