Database data TTL

Registered by Julien Danjou on 2013-04-25

Implement a TTL mechanism for data entering Ceilometer collector database.

Blueprint information

Status:
Complete
Approver:
Julien Danjou
Priority:
High
Drafter:
Mehdi Abaakouk
Direction:
Approved
Assignee:
Mehdi Abaakouk
Definition:
Drafting
Series goal:
Accepted for havana
Implementation:
Implemented
Milestone target:
milestone icon 2013.2
Started by
Thierry Carrez on 2013-05-28
Completed by
Julien Danjou on 2013-07-16

Related branches

Sprints

Whiteboard

Some db backends can directly handle the ttl:
- mongodb >= 2.2 can set db.meter.ensureIndex( { expireAfterSeconds: 3600 } )
- hbase can set "time_to_live" in families of the tables (in seconds)

For mongodb < 2.2 and other backends, a the periodic job can be done by the collector (or a other daemon ?)

So the first draft will do, on the collector, a period task will call a new function in the DB api that cleanup meter.
If the backend handled the ttl natively if will configure it at __init__ time and the function called by the collector just do nothing.

Gerrit topic: https://review.openstack.org/#q,topic:bp/db-ttl,n,z

Addressed by: https://review.openstack.org/30635
    WIP Initial implementation of db-ttl

(?)

Work Items

Dependency tree

* Blueprints in grey have been implemented.

This blueprint contains Public information 
Everyone can see this information.