davidyan74 commented on a change in pull request #12047:
URL: https://github.com/apache/beam/pull/12047#discussion_r448526068



##########
File path: sdks/python/apache_beam/runners/worker/sdk_worker.py
##########
@@ -570,6 +576,23 @@ def _log_lull_in_bundle_processor(self, processor):
           step_name_log,
           stack_trace)
 
+      if self._should_log_full_thread_dump():
+        self._log_full_thread_dump()
+
+  def _should_log_full_thread_dump(self):
+    now = time.time()
+    if self._last_full_thread_dump_secs + LOG_LULL_FULL_THREAD_DUMP_S < now:
+      self._last_full_thread_dump_secs = now
+      return True
+    return False
+
+  def _log_full_thread_dump(self):

Review comment:
       Thanks! I'm using _log_full_thread_dump() as a mock in the unit test. I 
can mock thread_dump() instead there or leave it as is. Let me know your 
thoughts.




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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to