Unexpected warning when create image without data

Bug #1471080 reported by wangxiyuan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Fix Released
Undecided
wangxiyuan

Bug Description

When create an image without data via api v2.0.

It will raise a warning like:
SAWarning: The IN-predicate on "image_locations.id" was invoked with an empty sequence. This results in a contradiction, which nonetheless can be expensive to evaluate. Consider alternative strategies for improved performance.

from the code:
https://github.com/openstack/glance/blob/master/glance/db/sqlalchemy/api.py#L798

The reason is that 'location_data' 's value is [], not None. So the function '_image_locations_set' will be always executed.

wangxiyuan (wangxiyuan)
Changed in glance:
assignee: nobody → wangxiyuan (wangxiyuan)
wangxiyuan (wangxiyuan)
description: updated
Changed in glance:
status: New → In Progress
Changed in glance:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in glance:
milestone: none → liberty-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in glance:
milestone: liberty-2 → 11.0.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.