On 06/09/2015 07:09 AM, Mark Goodwin wrote:
> On 06/09/2015 12:00 PM, Frank Ch. Eigler wrote:
>>> the patch itself looks ok to me, but as I read it, this is not just
>>> an err handling issue - if the cache has stale entries then that
>>> suggests the root cause of this issue is in the refresh
>>> functionality - shouldn't it invalidate all entries and then
>>> re-activate only those still current (plus any new instances)?
>>
>> Correcting that latent bug (if it is one) is likely possible as a
>> follow-on. In the present case, a dynamic data source could have
>> wildly fluctuating sets of instances available from fetch to fetch
>> (e.g., snapshots of recent traffic between source-host network-address
>> pairs, where A-B traffic might appear then disappear then later
>> reappear). What pmdaCacheOp sequence would you recommend?
>
> Well, something like this :
>
> pmdaCacheOp(indom, PMDA_CACHE_INACTIVE);
> refresh indom ...
> for each name in the refreshed instance domain
> pmdaCacheStore(indom, PMDA_CACHE_ADD, name, ...)
New commit b2b5112ac1c7cc2f07 on the dsmith/dev branch of pcpfans.git
tries to do just that. Please look it over.
--
David Smith
dsmith@xxxxxxxxxx
Red Hat
http://www.redhat.com
256.217.0141 (direct)
256.837.0057 (fax)
|