nova/nova/compute
Dan Smith 0a88916911 Batch results per cell when doing cross-cell listing
This extends the multi_cell_list module with batching support to avoid
querying N*$limit total results when listing resources across cells.
Instead, if our total limit is over a given threshold, we should query
smaller batches in the per-cell thread until we reach the total limit
or are stopped because the sort feeder has found enough across all cells
to satisfy the requirements. In many cases, this can drop the total number
of results we load and process from N*$limit to (best case) $limit+$batch
or (usual case) $limit+(N*$batch).

Since we return a generator from our scatter-gather function, this should
mean we basically finish the scatter immediately after the first batch query
to each cell database, keeping the threads alive until they produce all the
results possible from their cell, or are terminated in the generator loop
by the master loop hitting the total_limit condition. As a result, the
checking over results that we do immediately after the scatter finishes
will no longer do anything since we start running the query code for the
first time as heapq.merge() starts hitting the generators. So, this brings
a query_wrapper() specific to the multi_cell_list code which can mimic the
timeout and error handling abilities of scatter_gather_cells, but inline
as we're processing so that we don't interrupt the merge sort for a
failure.

Related-Bug: #1787977
Change-Id: Iaa4759822e70b39bd735104d03d4deec988d35a1
2018-08-24 13:29:23 -07:00
..
monitors Remove translation of log messages 2017-06-09 09:06:16 +00:00
__init__.py Switch to using oslo_* instead of oslo.* 2015-02-06 06:03:10 -05:00
api.py Merge "Fix host validity check for live-migration" 2018-08-09 11:36:47 +00:00
build_results.py Compute Add build_instance hook in compute manager 2014-12-04 10:12:00 -05:00
cells_api.py Fix missing marker functions 2018-01-25 03:37:48 +00:00
claims.py [Trivial] docstrings, typos, minor refactoring 2017-08-28 08:33:58 -05:00
flavors.py Remove unused flavor_delete_info() method 2018-08-03 12:44:52 -04:00
instance_actions.py Add instance action record for snapshot instances 2017-12-11 17:46:38 +08:00
instance_list.py Batch results per cell when doing cross-cell listing 2018-08-24 13:29:23 -07:00
manager.py Update nova network info when doing rebuild for evacuate operation 2018-08-08 19:12:49 -04:00
migration_list.py Use nova.db.api directly 2018-07-10 14:56:27 +00:00
multi_cell_list.py Batch results per cell when doing cross-cell listing 2018-08-24 13:29:23 -07:00
power_state.py Removed enum duplication from nova.compute 2016-09-02 07:30:44 +00:00
provider_tree.py Add method to get cpu traits 2018-07-24 12:37:46 +00:00
resource_tracker.py Hook resource_tracker to remove stale node information 2018-08-01 11:47:45 -07:00
rpcapi.py Update compute rpc version alias for rocky 2018-08-08 10:12:00 -07:00
stats.py Change consecutive build failure limit to a weigher 2018-06-06 15:18:50 -07:00
task_states.py Have one list of reboot task_states 2017-09-14 20:57:38 +00:00
utils.py Heal RequestSpec.is_bfv for legacy instances during moves 2018-07-23 12:24:10 -04:00
vm_states.py Removed enum duplication from nova.compute 2016-09-02 07:30:44 +00:00