Yicong-Huang commented on code in PR #4560:
URL: https://github.com/apache/texera/pull/4560#discussion_r3166223199


##########
amber/src/main/python/core/runnables/data_processor.py:
##########
@@ -49,20 +49,34 @@ def run(self) -> None:
         with self._context.tuple_processing_manager.context_switch_condition:
             
self._context.tuple_processing_manager.context_switch_condition.wait()
         self._running.set()
-        self._switch_context()
+        # Run debug-command / console-flush / exception checks before the
+        # first task, so a debug command queued during worker setup fires
+        # before any tuple/state/marker processing -- without consuming a
+        # round-trip on MainLoop's first switch_context.
+        self._post_switch_context_checks()

Review Comment:
   haha. it's naming tells you should not use it here: 
`_post_switch_context_checks()` it should only be used AFTER a switch context 
call.
   
   But, we can create a `_pre_loop_checks()`, and only check for control 
messages. note, doo not check for exceptions as it its not possible to have 
exception now. I think that'd be great.



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