← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1201758] Re: image-delete fires multiple queries to delete its child entries

 

** Changed in: glance
       Status: Fix Committed => Fix Released

** Changed in: glance
    Milestone: None => havana-3

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

Title:
  image-delete fires multiple queries to delete its child entries

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

Bug description:
  While deleting an image all its child entries are also deleted.

  Child entries types are image_locations, image_properties,
  image_members and image_tags

  Currently, for deleting the child entries the following is done:
  1. Fire a select query to fetch the child entries.  
  2. Enumerate through the entries and fire soft-delete (update query) on each child entry seperately.

  If the number of child entries grows higher, then the amount of
  queries fired to delete them grows equally higher essentially
  increasing the response time for image delete.

  This impelementation can be changed to fire one db query for all the
  child entries corresponding to a particular child entry type.

  eg., instead of invoking model.soft_delete(), we can use
  model_query(CHILD_ENTRY_TYPE).filter(some_condition).soft_delete().

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