ibzib commented on a change in pull request #15224:
URL: https://github.com/apache/beam/pull/15224#discussion_r676995467



##########
File path: 
runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/windmill/GrpcWindmillServer.java
##########
@@ -1525,8 +1525,8 @@ public boolean hasMoreElements() {
 
                 try {
                   blockedStartMs.set(Instant.now().getMillis());
-                  current = queue.take();
-                  if (current != POISON_PILL) {
+                  current = queue.poll(180, TimeUnit.SECONDS);
+                  if (current != null && current != POISON_PILL) {

Review comment:
       If `current == null` we could fall through to the `Got poison pill but 
stream is not done.` exception. Shouldn't we introduce a separate case for the 
timeout?




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