Comment 3 for bug 1721791

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

Reviewed: https://review.openstack.org/510203
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=00bbc2ffd356ed17b11d432875c172141cd50b24
Submitter: Jenkins
Branch: master

commit 00bbc2ffd356ed17b11d432875c172141cd50b24
Author: Dan Smith <email address hidden>
Date: Fri Oct 6 10:33:33 2017 -0700

    Fix instance_get_by_sort_filters() for multiple sort keys

    This method would not actually work for any query where multiple sort
    keys were provided. Since it effectively ANDed all of the sort_key > val
    conditions in the query, any multi-key sort would exclude a lot of
    results.

    This fix actually replicates much of the logic from the base
    paginate_query() utility method, which properly handles multiple
    keys by creating key1>val1 OR (key1=val2 AND key2>=val2) WHERE
    clauses necessary for proper ordering.

    Change-Id: I3dac96759f7c7f11a0e0e9d86731dd4d22462d33
    Partial-Bug: #1721791