Optimization: check_img_metadata_properties_quota should return immediately if metadata is empty

Bug #1220120 reported by David Jia
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
David Jia

Bug Description

When metadata is empty, the function check_img_metadata_properties_quota doesn't return correctly as expected, because the incorrect code line:
"if metadata is None:
        return"

David Jia (jiataotj)
Changed in nova:
assignee: nobody → David Jia (jiataotj)
Revision history for this message
David Jia (jiataotj) wrote :

althoug current code lines doesn't cause serious problem, we should correct it to avoid useless program running to benefit overall performance, so we should use "if not metadata" to replace the current code line.

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

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

Changed in nova:
status: New → In Progress
Mark McLoughlin (markmc)
Changed in nova:
importance: Undecided → Low
summary: - check_img_metadata_properties_quota doesn't return correctly when
- metadata is empty
+ Optimization: check_img_metadata_properties_quota should return
+ immediately if metadata is empty
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/44823
Committed: http://github.com/openstack/nova/commit/800e26f3ffd23f3f6bd5a1c09c5964d8da17ba41
Submitter: Jenkins
Branch: master

commit 800e26f3ffd23f3f6bd5a1c09c5964d8da17ba41
Author: jiataotj <email address hidden>
Date: Tue Sep 3 17:13:45 2013 +0800

    Replace incorrect Null checking to return correctly

    Null checking for metadata in check_img_metadata_properties_
    quota function doesn't work as designed, fix incorrect Null
    checking code.

    Change-Id: Id3f971091d857d6b2aebc4985cb932417c21b5dc
    Fixes: bug #1220120

Changed in nova:
status: In Progress → Fix Committed
Changed in nova:
milestone: none → icehouse-1
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: icehouse-1 → 2014.1
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.