[MongoDB] Refactor indexes for meter and resources
Currently Ceilometer uses redundant indexes in MongoDB and in same
time doesn't cover get_resources sorting by indexes.
In this CR source field indexing is deleted and resource.project_id,
resource.user_id indexes are combined to one.
New compound index covers the get_resource sorting and its parts
are used in queries by timestamp, project_id, user_id.
Reviewed: https:/ /review. openstack. org/207409 /git.openstack. org/cgit/ openstack/ ceilometer/ commit/ ?id=4b8929206ac dd28fecb14652d7 8f9ca675a4fdd4
Committed: https:/
Submitter: Jenkins
Branch: master
commit 4b8929206acdd28 fecb14652d78f9c a675a4fdd4
Author: Ilya Tyaptin <email address hidden>
Date: Thu Jul 30 14:18:42 2015 +0300
[MongoDB] Refactor indexes for meter and resources
Currently Ceilometer uses redundant indexes in MongoDB and in same project_ id, user_id indexes are combined to one.
time doesn't cover get_resources sorting by indexes.
In this CR source field indexing is deleted and resource.
resource.
New compound index covers the get_resource sorting and its parts
are used in queries by timestamp, project_id, user_id.
Change-Id: I077317533fd308 65eea8a3f32e3c3 a7f53fa6343
Closes: bug 1433924