mongdb get_event_types overly complex

Bug #1427393 reported by gordon chung
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ceilometer
Fix Released
Medium
gordon chung

Bug Description

currently, mongodb's implementation of get_event_types gets all events, loops, through said events and builds list of unique event_types.

this can be done in one line and optimised by db: db.event.distinct('event_type')

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ceilometer (master)

Fix proposed to branch: master
Review: https://review.openstack.org/160522

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ceilometer (master)

Reviewed: https://review.openstack.org/160522
Committed: https://git.openstack.org/cgit/openstack/ceilometer/commit/?id=1e5f830fe76b96731d7a95f2baf099a3334bbe3a
Submitter: Jenkins
Branch: master

commit 1e5f830fe76b96731d7a95f2baf099a3334bbe3a
Author: gordon chung <email address hidden>
Date: Mon Mar 2 16:41:02 2015 -0500

    use mongodb distinct

    we should use distinct capability mongo provides and not try to do
    it ourselves.

    Change-Id: I8a77308475e3e0b12430fcff0496caa1905eef10
    Closes-Bug: #1427393

Changed in ceilometer:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in ceilometer:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in ceilometer:
milestone: kilo-3 → 2015.1.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.