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


##########
runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/windmill/grpcclient/GrpcWindmillServer.java:
##########
@@ -295,10 +294,12 @@ private synchronized 
CloudWindmillServiceV1Alpha1Grpc.CloudWindmillServiceV1Alph
     if (stubList.isEmpty()) {
       throw new RuntimeException("windmillServiceEndpoint has not been set");
     }
-    if (stubList.size() == 1) {
-      return stubList.get(0);
-    }
-    return stubList.get(rand.nextInt(stubList.size()));
+
+    CloudWindmillServiceV1Alpha1Grpc.CloudWindmillServiceV1Alpha1Stub stub =
+        (stubList.size() == 1 ? stubList.get(0) : 
stubList.get(rand.nextInt(stubList.size())));
+
+    return stub.withDeadlineAfter(
+        AbstractWindmillStream.DEFAULT_STREAM_RPC_DEADLINE_SECONDS, 
TimeUnit.SECONDS);

Review Comment:
   i rebased this branch onto the branch that removes the sync stubs so i could 
reuse some of the code.



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