Comment 2 for bug 1940399

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

Reviewed: https://review.opendev.org/c/openstack/nova/+/804968
Committed: https://opendev.org/openstack/nova/commit/d31b26e09d469748f2ae2cc1e5f6f57401834adc
Submitter: "Zuul (22348)"
Branch: master

commit d31b26e09d469748f2ae2cc1e5f6f57401834adc
Author: Fabian Wiesel <email address hidden>
Date: Tue Aug 17 16:36:06 2021 +0200

    VMWare: Use WithRetrieval to get all results

    In various places, own version of iterating over the results are implemented,
    sometimes even faulty.
    The following functions where only getting up to vmware.maximum_objects objects (100 by default)
    vm_util.get_all_cluster_mors, vm_util.get_stats_from_cluster.

    Previously, the results were fetched in batches of up to vmware.maximum_objects items.
    Using WithRetrieval yields an iterator to the results, which pages transparently to
    the next request.
    Consumers of the output of the results where changed to work on an iterator, where easily
    possible.

    Replaced the quadratic algorithm in `ds_util._filter_datastores_matching_storage_policy`
    with one of O(n log(n)) runtime

    Closes-Bug: #1940399
    Change-Id: I8283c3e76c595cb32527d1b8745933d044e22734