OK, d) is probably most sensible and not hard (now I've looked at the
code), so I'll implement that option.
And yep, pmdaCacheOp(indom, PMDA_CACHE_CULL) will clean the cache for
that indom.
On Mon, 2010-01-25 at 12:51 +1100, Max Matveev wrote:
> 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
|