[ZODB-Dev] Relstorage pack problems

Alan Runyan runyaga at runyaga.com
Fri Jan 23 15:08:43 EST 2009


On Fri, Jan 23, 2009 at 1:45 PM, Shane Hathaway <shane at hathawaymix.org>wrote:

> Shane Hathaway wrote:
> > Assuming your bad script caused your problem, it is likely that packing
> > will still mess up your database, since you still probably have mixed-up
> > object_state rows.  Don't pack until I've had a chance to look again.
>
> Here is some more analysis.  Now that I understand you accidentally
> merged two databases into one by forcing copyTransactionsFrom() to run
> when it shouldn't, I looked for the transactions you merged.  First I
> looked for the OIDs with a confused transaction ID.
>
>
> => select zoid from current_object where tid != (select max(tid) from
> object_state where object_state.zoid = current_object.zoid);
>  zoid
> ------
>     7
>    10
>    12
>    11
>     9
>     8
> (6 rows)


Wow.  All of that with some SQL.

Out of curiosity what would be the process if you were using FileStorage to
diagnose the same problem?  Do the same thing by iterating over the entire
storage and filling in some structures and doing the comparison manually?
Sounds like it would take a few hours, with SQL -- it seems pretty
straightforward.

I'm impressed.

The sooner this gets into the mainline of ZODB -- the better.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zodb-dev/attachments/20090123/1c44fe15/attachment.html 


More information about the ZODB-Dev mailing list