Re: Zeopack fails raising KeyError

Rodrigo Ferreira de Souza <[email protected]>
Newsgroups gmane.comp.web.zope.zodb
Message-ID <[email protected]>
Tried to follow this tutorial, but didn't work in our case, we have all 
references, but no blobfile.

Then my next move was to run the script fixblobs.py to remove these blobs 
<https://docs.plone.org/manage/troubleshooting/transactions.html>, it 
removed 6 blobs, but still have POSKeyError when try to run zeopack or 
clear and rebuild catalog.

After some debug at ZEO code trying to log the OIDs I realize that these 
OIDs are differente from the one described at multi-zodb-gc tutorial, I 
could not get the object with app._p_jar.get command.

But I have the blob file name that was supposed to exists, so I treated the 
exception to create an empty file where it was supposed to be:

            try:
                self._server.sendBlob(oid, serial)
            except POSException.POSKeyError:
                logger.info('%%% Creating empty blob: 
{0}'.format(blob_filename))
                os.system('mdkir -p 
{0}'.format(os.path.dirname(blob_filename)))
                os.system('touch {0}'.format(blob_filename))
                return blob_filename

The process is running in our staging server and looks to work. Do you see 
any problem doing this kind of hack? These empty blobs will be removed 
after run a zeopack?

Thanks

On Thursday, March 9, 2017 at 10:29:29 AM UTC-3, Héctor Velarde wrote:
>
> Cléber just point me out to this excellent documentation written by 
> Hanno to explain how to use zc.zodbdgc: 
>
> http://www.zodb.org/en/latest/articles/multi-zodb-gc.html 
>
> just awesome! 
>

-- 
You received this message because you are subscribed to the Google Groups "zodb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.