pcp
[Top] [All Lists]

Re: [pcp] pmda instance cache operations

To: kenj@xxxxxxxxxxxxxxxx
Subject: Re: [pcp] pmda instance cache operations
From: Max Matveev <makc@xxxxxxxxx>
Date: Mon, 25 Jan 2010 12:51:28 +1100
Cc: pcp@xxxxxxxxxxx
In-reply-to: <1264372796.5401.13.camel@xxxxxxxxxxxxxxxx>
References: <19292.18578.486513.899049@xxxxxxxxxxxx> <1264365282.5401.3.camel@xxxxxxxxxxxxxxxx> <19292.49501.402549.217702@xxxxxxxxxxxx> <1264372796.5401.13.camel@xxxxxxxxxxxxxxxx>
On Mon, 25 Jan 2010 09:39:56 +1100, Ken McDonell wrote:

 kenj> So, what do you think the correct outcome should be?

 kenj> a) second pmdaCacheOp(indom, PMDA_CACHE_LOAD) returns an error?
 kenj> b) pmdaCacheOp(indom, PMDA_CACHE_LOAD) fails if anything already in the
 kenj> cache?
 kenj> c) purge cache first then load, so 2 inactive instances?
 kenj> d) cache state wins if loaded instance already in cache?

 kenj> I'd vote for b) which is a very similar to a), but a little easier to
 kenj> explain and deals with the more subtle no load, store an instance, then
 kenj> try to load flawed logic.

In my particular case d) is what I was expecting but then I wasn't
expecting the second LOAD. I can live with b), just need to get into
the habit of checking return values from LOAD.

On the somewhat related note, am I correct in assuming that
pmdaCacheOp(indom, PMDA_CACHE_CULL) is the only option to clean
all the entires in the cache in preparation to the second loading?

max

<Prev in Thread] Current Thread [Next in Thread>