Ma77Ball commented on code in PR #6522:
URL: https://github.com/apache/texera/pull/6522#discussion_r3633773931


##########
amber/src/main/python/core/architecture/handlers/control/end_worker_handler.py:
##########
@@ -37,13 +37,19 @@ async def end_worker(self, req: EmptyRequest) -> 
EmptyReturn:
         has finished not only the data processing logic, but also the 
processing
         of all the control messages.
         """
-        # Ensure this is really the last message.
-        input_queue: IQueue = self.context.input_queue
-        if not input_queue.is_empty():
+        # Ensure this is really the last message. Read the queued count once 
(InternalQueue
+        # exposes size(); the base IQueue interface does not) and branch on it.
+        input_queue: InternalQueue = self.context.input_queue
+        queued_count = input_queue.size()

Review Comment:
   The PR description documents a peek()-based approach plus internal_queue.py 
and test_internal_queue.py changes, but this diff uses size() and touches only 
these two files; please reconcile the description with the actual diff.



-- 
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