[openstack-dev] [ceilometer] The reset on the cumulative counter

Eoghan Glynn eglynn at redhat.com
Wed Nov 28 13:38:33 UTC 2012


> > > That doesn't work if different collector instances receive
> > > events from the same meter on the same resource in
> > > parallel (which could happen easily if the queue gets
> > > backed up).
> >
> > It does if you don't try to cache locally but request the
> > last value From the storage backend, right? 
>
> There's a race condition, though. If you and I are processing events
> at the same time, we get the same "last value" from the storage but
> then try to update it to our current value.

Yeah, I think it would be possible to disambiguate with the timestamp
as long as only two events are mis-ordered (as the older last_value
can always be recovered from the more recent last_value - delta).

However that approach wouldn't extend to t2,t0,t1 style misorderings
(if such a thing has a non-zero probability of occurring) and the
problem quickly becomes intractable.

So sounds like the delta would be calculated at source to be 100%
rock-solid.

Cheers,
Eoghan



More information about the OpenStack-dev mailing list