Max,
I'd expect 2 entries (assuming the initial PMDA_CACHE_LOAD loads
nothing), and both of these should be inactive.
As the man page says ...
This operation loads the cache from the external file, and then
all cache entries are marked inactive, and the additional data
pointer is set to NULL. Consequently, a PMDA is only likely to
perform this operation once per execution.
What are you seeing?
Is there some reason you need to call PMDA_CACHE_LOAD a second time?
On Mon, 2010-01-25 at 00:18 +1100, Max Matveev wrote:
> Ken,
>
> As the author of pmdaCache, what is the behaviour you would expect
> of the following sequence of calls (assuming that the cached file
> for the indom exists and contains entries for ook and eek):
>
> pmdaCacheOp(indom, PMDA_CACHE_LOAD);
> pmdaCacheStore(indom, PMDA_CACHE_ADD, "ook", NULL);
> pmdaCacheStore(indom, PMDA_CACHE_ADD, "eek", NULL);
> pmdaCacheOp(indom, PMDA_CACHE_STORE);
> pmdaCacheOp(indom, PMDA_CACHE_LOAD);
>
> In particular, how many entries will be in the cache after CACHE_LOAD,
> how many will be active and how many will be inactive?
>
> The reason I'm asking is because I've had to chase a bug in my code
> which did just that and broke pmdaInstance callback.
>
> max
>
> _______________________________________________
> pcp mailing list
> pcp@xxxxxxxxxxx
> http://oss.sgi.com/mailman/listinfo/pcp
|