No need to call pollster default discovery if resource is found through pipeline

Bug #1437175 reported by Lianhao Lu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ceilometer
Fix Released
Medium
Lianhao Lu

Bug Description

In the current PollingTask.poll_and_publish(), we use the following flow to get the candidate resources for the pollsters to poll:

step 1: call pollster's default discovery to get pollster_resources

step 2: get source_resources from discovery defined in pipeline

step 3: set the candidate_resources as:
            candidate_res = (source_resources or pollster_resources)

If we've found source_resources from step2, this is just a waste of time for step1. We need to adjust the flow.

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/168251

Changed in ceilometer:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ceilometer (master)

Reviewed: https://review.openstack.org/168251
Committed: https://git.openstack.org/cgit/openstack/ceilometer/commit/?id=9efa08d4a322e6331b7b48b3a04b1c0636ed68d3
Submitter: Jenkins
Branch: master

commit 9efa08d4a322e6331b7b48b3a04b1c0636ed68d3
Author: Lianhao Lu <email address hidden>
Date: Fri Mar 27 15:07:02 2015 +0800

    Optimize the flow of getting pollster resources

    No need to call pollster's default discovery to get the resources if the
    pipeline has already provided them.

    Change-Id: Ib8959498b9dfd848087484d3348578733b790c29
    Closes-Bug: #1437175

Changed in ceilometer:
status: In Progress → Fix Committed
Lianhao Lu (lianhao-lu)
Changed in ceilometer:
milestone: none → kilo-rc1
Thierry Carrez (ttx)
Changed in ceilometer:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in ceilometer:
milestone: kilo-rc1 → 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.