Skip to content

Commit 48a6ceb

Browse files
authored
[Dataflow Streaming] Fix spammy log during GrpcGetDataStream physical stream half-closing (#38158)
1 parent 0471bb5 commit 48a6ceb

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
230+
// stream. However we treat them as possibly pending on all physical streams to ensure that we
231+
// recreate streams to send 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)