← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1471080] [NEW] Unexpected warning when create image without data

 

Public bug reported:


When create a 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.

** Affects: glance
     Importance: Undecided
     Assignee: wangxiyuan (wangxiyuan)
         Status: New

** Changed in: glance
     Assignee: (unassigned) => wangxiyuan (wangxiyuan)

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/1471080

Title:
  Unexpected warning when create image without data

Status in OpenStack Image Registry and Delivery Service (Glance):
  New

Bug description:
  
  When create a 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.

To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1471080/+subscriptions


Follow ups

References