[ZODB-Dev] Recovering from BTree corruption

Dieter Maurer dieter at handshake.de
Tue Sep 11 13:44:56 EDT 2007


Alan Runyan wrote at 2007-9-11 09:27 -0500:
> ...
>oid 0xD87110L BTrees._OOBTree.OOBucket
>last updated: 2007-09-04 14:43:37.687332, tid=0x37020D3A0CC9DCCL
>refers to invalid objects:
>        oid ('\x00\x00\x00\x00\x00\xb0+f', None) missing: '<unknown>'
>        oid ('\x00\x00\x00\x00\x00\xb0N\xbc', None) missing: '<unknown>'
>        oid ('\x00\x00\x00\x00\x00\xb0N\xbd', None) missing: '<unknown>'
>        oid ('\x00\x00\x00\x00\x00\xd7\xb1\xa0', None) missing: '<unknown>'
>        oid ('\x00\x00\x00\x00\x00\xc5\xe8:', None) missing: '<unknown>'
>        oid ('\x00\x00\x00\x00\x00\xc3\xc6l', None) missing: '<unknown>'
>        oid ('\x00\x00\x00\x00\x00\xc3\xc6m', None) missing: '<unknown>'
>        oid ('\x00\x00\x00\x00\x00\xcahC', None) missing: '<unknown>'
>        oid ('\x00\x00\x00\x00\x00\xaf\x07\xc1', None) missing: '<unknown>'

Looks as if the "OOBucket" has lost quite some value links (as
only a single one links to the next bucket).

>My questions are:
>
> - I imagine if there are 'invalid' references this is considered "corruption"
>   or "inconsistency"?

I depends on your preferences.

> ...
>  - Having these invalid references, is this common to  ZODB applications?

No.

At least not for ZODB applications that do not use inter database
references.

>> Possibly, there's a backup that has data records for the missing OIDs.
>
>Going to ask hosting company to pull up backups for the past few weeks.
>But how i'm going to find this other than "seeing if the folder allows me
>to iterate over the items" is not throwing POSKeyError.  Does that sound
>like a decent litmus test?

You can also run "fsrefs" on it. When you do not get "missing ...",
then the backup does not have you POSKeyError (but may lack quite
a few newer modifications).



-- 
Dieter


More information about the ZODB-Dev mailing list