m-trieu commented on code in PR #31784:
URL: https://github.com/apache/beam/pull/31784#discussion_r1696346418


##########
runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/windmill/work/refresh/FixedStreamHeartbeatSender.java:
##########
@@ -49,15 +50,24 @@ public static FixedStreamHeartbeatSender 
create(GetDataStream getDataStream) {
 
   @Override
   public void sendHeartbeats(Heartbeats heartbeats) {
-    if (getDataStream.isShutdown()) {
+    String threadName = Thread.currentThread().getName();
+    try {
+      String backendWorkerToken = getDataStream.backendWorkerToken();
+      if (!backendWorkerToken.isEmpty()) {
+        // Decorate the thread name w/ the backendWorkerToken for debugging. 
Resets the thread's
+        // name after sending the heartbeats succeeds or fails.
+        Thread.currentThread().setName(threadName + "-" + backendWorkerToken);

Review Comment:
   done used `null` instead of empty string



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