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


##########
runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/windmill/client/AbstractWindmillStream.java:
##########
@@ -333,6 +372,49 @@ public final synchronized void halfClose() {
     }
   }
 
+  /**
+   * Internally restart the stream to avoid {@link Status#DEADLINE_EXCEEDED} 
errors.
+   *
+   * @implNote Similar behavior to {@link #halfClose()}, except we allow 
callers to interact with
+   *     the stream after restarts.
+   */
+  private synchronized void restart() throws WindmillStreamShutdownException {
+    debugMetrics.recordRestartReason("Internal Timeout");
+    try {
+      requestObserver.release();

Review Comment:
   what would we want to do in this case
   
   AbstractWindmillStream
     - internal stream observer A
   
   - Internal Stream Observer A sends a request 1
   - Internal Stream Observer A times out and is released and scheduled for 
closure
   - AbstractWindmillStream schedules Internal StreamObserver A for closure and 
creates Internal StreamObserver B
   - Internal Stream Observer B starts (resend headers), and is ready for 
outbound/inbound requests/responses
   - a Response comes back to Internal Stream Observer A corresponding to 
request 1



-- 
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: github-unsubscr...@beam.apache.org

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

Reply via email to