scwhittle commented on code in PR #28016:
URL: https://github.com/apache/beam/pull/28016#discussion_r1307186785


##########
runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/windmill/grpcclient/GrpcWindmillServer.java:
##########
@@ -238,34 +237,29 @@ public synchronized boolean isReady() {
   private synchronized void initializeLocalHost(int port) {
     this.logEveryNStreamFailures = 1;
     this.maxBackoff = Duration.millis(500);
-    this.unaryDeadlineSeconds = 10; // For local testing use short deadlines.
     Channel channel = localhostChannel(port);
     if (options.isEnableStreamingEngine()) {
       this.stubList.add(CloudWindmillServiceV1Alpha1Grpc.newStub(channel));
-      
this.syncStubList.add(CloudWindmillServiceV1Alpha1Grpc.newBlockingStub(channel));
     } else {
-      this.syncApplianceStub = WindmillApplianceGrpc.newBlockingStub(channel);
+      this.syncApplianceStub =
+          WindmillApplianceGrpc.newBlockingStub(channel).withDeadlineAfter(10, 
TimeUnit.SECONDS);

Review Comment:
   I remembered that I think this doesn't work as expected. The deadline is 
translated to an absolute timestamp here and thus all calls made with this stub 
will timeout after 10 seconds from when this is called (instead of a timeout on 
each call).
   
   Could look into adding a test about that or at least add a comment for next 
time on why it is done for each call.
   
   See https://github.com/grpc/grpc-java/issues/1495



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