Skip to content

Commit a9e7d3b

Browse files
committed
[Dataflow Streaming] Fix spammy log during GrpcGetDataStream physical stream half-closing
1 parent f7c280c commit a9e7d3b

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

  • runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/windmill/client/grpc

runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/windmill/client/grpc/GrpcGetDataStream.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,12 +226,15 @@ public void onResponse(StreamingGetDataResponse chunk) {
226226

227227
@Override
228228
public boolean hasPendingRequests() {
229+
// Note the batchesSizeSupplier may reflect batches that could be sent on another physical stream.
230+
// However we treat them as possibly pending on all physical streams to ensure that we recreate streams to send
231+
// them.
229232
return !pending.isEmpty() || batchesSizeSupplier.get() > 0;
230233
}
231234

232235
@Override
233236
public void onDone(Status status) {
234-
if (status.isOk() && hasPendingRequests()) {
237+
if (status.isOk() && !pending.isEmpty()) {
235238
LOG.warn("Pending requests not expected on successful GetData stream flushing.");
236239
}
237240
for (AppendableInputStream responseStream : pending.values()) {

0 commit comments

Comments
 (0)