Hi David,
----- Original Message -----
> [...]
> OK, here's a quite rough patch that makes the needed changes to cache.c
> (and associated files), and then modifies the JSON PMDA to use indom
> caches for cluster and metric assignments. There are several "FIXME"
> comments scattered throughout the changes, and more code will need to be
> added to pmda.py to make this more user-friendly. But, it does seem to
> work in the limited testing I've done.
>
Ah excellent, sounds promising.
+
+ if (maximum < 0)
+ return PM_ERR_SIGN;
+ // FIXME: What do we do if there is already something in the cache
+ // with an instance greater than the new maximum?
Possibly return PM_ERR_TOOBIG or PM_ERR_TOOSMALL for this case?
+ // FIXME 2: Does this maximum value need to be saved/restored when
+ // the cache itself is saved/restored? Currently only a few things
+ // from the header are stored.
+ h->maxinst = maximum;
Yep, I believe so - see Ken's note below, third paragraph...
http://www.pcp.io/pipermail/pcp/2015-April/006982.html
cheers.
--
Nathan
|