[openstack-dev] [Ceilometer][MongoDB] Using native time to live feature in MongoDB

ZhiQiang Fan aji.zqfan at gmail.com
Thu Nov 6 11:13:49 UTC 2014


+1

On Thu, Nov 6, 2014 at 6:27 PM, Igor Degtiarov <idegtiarov at mirantis.com>
wrote:

> 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
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>



-- 
blog: zqfan.github.com
git: github.com/zqfan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20141106/c9c4da09/attachment.html>


More information about the OpenStack-dev mailing list