[ZODB-Dev] ZEO 2 : cache twiddling
Shane Hathaway
shane@zope.com
Thu, 21 Nov 2002 11:06:23 -0500
Guido van Rossum wrote:
>>>The first time I do something that involves reading from one of the
>>>mounted storages, I have to wait an _age_. What's happening? Is the
>>>ClientCache filling itself with all objects it can before it does
>>>anything? Certainly much slower than before.
>>
>>Uh-oh. I wonder if you're accidentally sharing one cache between three
>>storages. This is bound to break very badly, and there's currently
>>nothing that detects this condition. Could you "ls -l" the directory
>>where your cache files are? It's usually the same directory that holds
>>Data.fs.
>
>
> How could this happen? Persistent caches have different names based
> on the storage name and client name. Non-persistent caches use
> tempfile.
Chris is running three storages in the same process. The client name is
the same since it comes from the ZEO_CLIENT environment variable, and
the storage name for all three is probably the default, "1". But if
Chris is running with non-persistent caches then you're right, there's
no issue. Chris?
>>Of course, I would expect ZODB to shatter in a million pieces if
>>this were the case, rather than chug along with some occasional
>>breakage. Hmph.
>
>
> Not if the oid sets are distinct (dunno if they are).
Ah-ha, that makes sense then. The OID sets are likely to intersect
randomly. This would result in gradual chaos.
Shane