From 3b99b8a6e9ae592e157e85bc0ba56d6b0a75fcff Mon Sep 17 00:00:00 2001 From: Balazs Gibizer Date: Wed, 25 Jun 2025 19:09:41 +0200 Subject: [PATCH] FUP: Translate scatter-gather to futurist Small fixes for Ibff6c73ad9af911a42204e53fee31ed5537c829d Change-Id: I288c48476a5cd6f0f657f29aab6246500fe52765 Signed-off-by: Balazs Gibizer --- nova/conf/base.py | 3 ++- nova/tests/unit/test_context.py | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/nova/conf/base.py b/nova/conf/base.py index 92595cb6d5..7fe0282ffb 100644 --- a/nova/conf/base.py +++ b/nova/conf/base.py @@ -75,7 +75,8 @@ greenthread pool concurrently, defaults to 1000, min value is 100. help=''' The number of tasks that can run concurrently, one for each cell, for operations requires cross cell data gathering a.k.a scatter-gather, like -listing instances across multiple cells. +listing instances across multiple cells. This is only used if the service is +running in native thread mode. '''), ] diff --git a/nova/tests/unit/test_context.py b/nova/tests/unit/test_context.py index 43765bc384..fb6b9fe517 100644 --- a/nova/tests/unit/test_context.py +++ b/nova/tests/unit/test_context.py @@ -389,6 +389,8 @@ class ContextTestCase(test.NoDBTestCase): uuid=uuids.cell1) mappings = objects.CellMappingList(objects=[mapping0, mapping1]) + # We call scatter gather with a short (1s) timeout, dispatching two + # tasks where the second will wait forever on our work semaphore above. results = context.scatter_gather_cells(ctxt, mappings, 1, task) self.assertEqual(2, len(results)) self.assertEqual( @@ -427,6 +429,8 @@ class ContextTestCase(test.NoDBTestCase): uuid=uuids.cell1) mappings = objects.CellMappingList(objects=[mapping0, mapping1]) + # We call scatter gather with a short (1s) timeout, dispatching two + # tasks that will wait forever on our work event above. results = context.scatter_gather_cells( ctxt, mappings, 1, task)