aglinxinyuan commented on code in PR #4424:
URL: https://github.com/apache/texera/pull/4424#discussion_r3140950730


##########
amber/src/main/python/core/runnables/main_loop.py:
##########
@@ -329,7 +330,7 @@ def _process_ecm(self, ecm_element: ECMElement):
 
             if ecm.ecm_type != EmbeddedControlMessageType.NO_ALIGNMENT:
                 self.context.pause_manager.resume(PauseType.ECM_PAUSE)
-
+            self._switch_context()

Review Comment:
   I kept the existing structure and made the marker handoff non-consuming 
instead.
   
   `DataProcessor` no longer clears `current_internal_marker` when it reads it, 
and `MainLoop` now clears the marker only after `_process_start_channel()` / 
`_process_end_channel()` finishes.
   
   This keeps the ECM-side `_switch_context()` for the repeated-state fix, 
while avoiding the race you pointed out where `DataProcessor` could consume the 
marker before `MainLoop` handled the lifecycle logic.



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