Hi stackers,

I'm working on solving bug [1]. Time to live feature has native
implementation in MongoDB thru index.

Now we remove docs from resource table if they have no relations with
existing samples in meter table while samples are removed when time to
live is expired. So it seems that we can use ttl index also in
resource table and remove reduce operation from the code.

We update field last_sample_timestamp in resource table with every new
sample that is received from certain resource. So adding ttl index to
that field gives the same result as reduce operation in
clear_expired_metering_data, but it will work in background with low
priority and won't block database.

Change request with implementation of ttl index in resource table [2].

[1] https://bugs.launchpad.net/ceilometer/+bug/1270779
[2] https://review.openstack.org/#/c/132988/

Cheers, Igor.

OpenStack-dev mailing list

Reply via email to