[ZODB-Dev] blobs missing with relstorage and small blob cache dir

Shane Hathaway shane at hathawaymix.org
Tue Mar 1 03:17:06 EST 2011


On 02/28/2011 07:37 PM, Shane Hathaway wrote:
> On 02/28/2011 08:19 AM, Maurits van Rees wrote:
>> I wonder if there is some code that mistakenly throws away the wrong
>> blob; it should throw away the oldest one I'd think, and not the one
>> that it just loaded.
>>
>> The workaround is probably just to not set the blob-cache-size this low.
>>     But I tried this low setting to work around a different problem, which
>> I will report in a different post.
>
> This reveals how naive the blob cache management is in both RelStorage
> and ZEO.  It is smart enough to use the atime of files (thus you should
> not disable atime on a filesystem that hosts a blob cache), but the
> cache management does not guarantee downloaded files are kept long
> enough to actually read them.

Oops, I take it back after reviewing the blob code tonight.  ZODB 3.9 
and above is not naive about this issue.  While ZODB 3.8 allows blob 
files to disappear at the wrong times, ZODB 3.9 has internal retry 
mechanisms that ensure blob files will be opened even when the blob 
cache size is too small.

RelStorage can not fix this issue.  If you want stable blob support, as 
Hanno said, you need ZODB 3.9 or above.

Shane


More information about the ZODB-Dev mailing list