populate_queued_for_delete queries the cell database for instances even if there are no instance mappings to migrate in that cell

Bug #1817961 reported by Matt Riedemann on 2019-02-27
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Matt Riedemann

Bug Description

If we get here:


And the results are empty we can move on to the next cell without querying the cell database since we have nothing to migrate.

Also, the joinedload on cell_mapping here:


Is not used so could also be removed.

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

Changed in nova:
assignee: nobody → Matt Riedemann (mriedem)
status: Triaged → In Progress

Reviewed: https://review.openstack.org/639840
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=47061e699b9dbf6fdeea572a5abeaa72e499ec87
Submitter: Zuul
Branch: master

commit 47061e699b9dbf6fdeea572a5abeaa72e499ec87
Author: Matt Riedemann <email address hidden>
Date: Wed Feb 27 16:24:24 2019 -0500

    Optimize populate_queued_for_delete online data migration

    The data migration was needlessly querying the cell database
    for instances even if there were no instance mappings in that
    database that needed to be migrated. This simply continues to
    the next cell if the instance mappings in the current cell are

    While we're in here, the joinedload on 'cell_mapping' can be
    removed since it's not used.

    Closes-Bug: #1817961

    Change-Id: Idf35ed9d57945bc80fbd47393b7de076330160e6

Changed in nova:
status: In Progress → Fix Released

This issue was fixed in the openstack/nova release candidate.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers