[openstack-dev] [Ceilometer][MongoDB] Using native time to live feature in MongoDB
idegtiarov at mirantis.com
Thu Nov 6 10:27:40 UTC 2014
I'm working on solving bug . 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 .
More information about the OpenStack-dev