From 00486935335011bc1f5fe59213b442261f2d7429 Mon Sep 17 00:00:00 2001 From: Miguel Grinberg Date: Fri, 24 Oct 2025 19:10:36 +0100 Subject: [PATCH] Use an unbuffered queue for the sync bulk helper --- elasticsearch/helpers/actions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elasticsearch/helpers/actions.py b/elasticsearch/helpers/actions.py index 79197a1e4..22d4ebe22 100644 --- a/elasticsearch/helpers/actions.py +++ b/elasticsearch/helpers/actions.py @@ -261,7 +261,7 @@ def _chunk_actions( yield ret else: item_queue: queue.Queue[_TYPE_BULK_ACTION_HEADER_WITH_META_AND_BODY] = ( - queue.Queue() + queue.Queue(maxsize=1) ) def get_items() -> None: