[ZODB-Dev] Wrong blob returned in one of the zeo clients

Maurits van Rees m.van.rees at zestsoftware.nl
Tue Mar 1 16:47:07 EST 2011


Op 01-03-11 21:32, Shane Hathaway schreef:
> On 03/01/2011 08:05 AM, Maurits van Rees wrote:
>> No, I am still seeing it.  I now see more clearly that the problem is
>> that two files share the same blob name.  I completely remove the blob
>> cache and restart the zeo client.  I visit image number 1 and get this
>> file in the var/blobcache:
>> 291/0x038c599924e70177.blob
>
> Did you copy that filename exactly?  Blob cache filenames should not
> have an 'x' in them.  I would expect to see a '.' where you put the 'x'.
>    I wonder if you somehow got the wrong cache layout, or if something is
> monkey-patching the cache layout.

Yes, I copied the filename exactly.  After clearing the cache and 
visiting a few images the cache is filled like this:

$ find . -name '*blob'
./502/0x038c599924e70177.blob
./839/0x038c599924e70177.blob
./828/0x038c599924e70177.blob
./871/0x038cabfeee9f6c88.blob
./291/0x038c599924e70177.blob
./846/0x038c599924e70177.blob
./706/0x038c599924e70177.blob

It could be that plone.app.blob does some monkey-patching.  I am not 
aware of any other code in this project that could possibly be involved 
here.

Ehm... there seems to be a a preoccupation with certain blob file names. 
  In fact in a blob cache directory in this project there are only two 
distinct blob file names, even though there are a bit over one thousand 
files in exactly 1000 directories:

$ find . -name '*blob' | cut -d "/" -f3 | sort | uniq -c | sort -g
      61 0x038c599924e70177.blob
     997 0x038c64edca37a033.blob
$ find . -type d | wc -l
1000

That is pretty weird!  I can understand a few duplicates because images 
are saved in a few sizes, but this is too much.

To reiterate some versions:

- Plone 3.3.5
- ZODB3 3.8.6-polling
- RelStorage 1.5.0b1
- Zope2 2.10.12
- plone.app.blob 1.3
- plone.app.imaging 1.0.1

Blobs are stored in postgres with RelStorage.  Layout of the blob cache 
dir is 'zeocache'.

-- 
Maurits van Rees
Web App Programmer at Zest Software: http://zestsoftware.nl
Personal website: http://maurits.vanrees.org/



More information about the ZODB-Dev mailing list