hterik commented on code in PR #26639:
URL: https://github.com/apache/airflow/pull/26639#discussion_r1071805534


##########
airflow/executors/kubernetes_executor.py:
##########
@@ -634,13 +690,37 @@ def sync(self) -> None:
             self.log.debug("self.queued: %s", self.queued_tasks)
         self.kube_scheduler.sync()
 
-        last_resource_version: dict[str, str] = defaultdict(lambda: "0")
-        while True:
+        """processing result queue"""
+        self.last_resource_version = defaultdict(lambda: "0")
+        multi_threads_queue_process(

Review Comment:
   multi_threads_queue_process will start and stop multiple threads for each 
sync() tick. I'm a bit out of touch on the real world overhead of this but I've 
always been taught that starting a thread comes with a lot of overhead. 
   
   Can one use a fixed ThreadPool instead?  This would also make the batching 
and queueing logic a lot easier, as dstandish suggested 
[above](https://github.com/apache/airflow/pull/26639/files#r1036345333) 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to