LEEKYE commented on code in PR #35391:
URL: https://github.com/apache/beam/pull/35391#discussion_r2304170241


##########
sdks/python/apache_beam/runners/worker/worker_status.py:
##########
@@ -267,17 +268,34 @@ def _log_lull_sampler_info(self, sampler_info, 
instruction):
         step_name_log = ''
 
       stack_trace = self._get_stack_trace(sampler_info)
+      if (self._passed_lull_timeout_since_last_log() and
+          sampler_info.time_since_transition > self.log_lull_timeout_ns):
+        _LOGGER.warning(
+            (
+                'Operation ongoing in bundle %s%s for at least %.2f seconds'
+                ' without outputting or completing.\n'
+                'Current Traceback:\n%s'),
+            instruction,
+            step_name_log,
+            lull_seconds,
+            stack_trace,
+        )
+      if (self._element_processing_timeout_ns and
+          sampler_info.time_since_transition
+          > self._element_processing_timeout_ns):
+        _LOGGER.error(
+            (
+                'Operation ongoing in bundle %s%s for at least %.2f seconds'

Review Comment:
   > Can we say smth like:
   > 
   > `f'Processing of an element has exceeded the specified timeout of 
{element_processing_timeout_minutes} minutes. SDK harness will be terminated'`
   > 
   > Ideally the message would be consistent across SDKs.
   
   I would prefer using 'Processing of an element in bundle %s%s has exceeded 
the specified timeout of %.2f minutes.'
                   'SDK harness will be terminated.\n'
                   'Current Traceback:\n%s'), this would provide more clear 
error messages for debugging because the above error message is not guaranteed 
to be printed out before this



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