Skip to content

Commit 1b29e5f

Browse files
authored
[Dataflow Streaming] do not spam logs when onNext called on closed StreamObserver (#33977)
1 parent 27f9fe9 commit 1b29e5f

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

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

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -122,12 +122,9 @@ public void onNext(T t) throws StreamClosedException, WindmillStreamShutdownExce
122122
try {
123123
delegate.onError(cancellationException);
124124
} catch (IllegalStateException onErrorException) {
125-
// If the delegate above was already terminated via onError or onComplete from another
126-
// thread.
127-
logger.warn(
128-
"StreamObserver was already cancelled {} due to error.",
129-
onErrorException,
130-
cancellationException);
125+
// The delegate above was already terminated via onError or onComplete.
126+
// Fallthrough since this is possibly due to queued onNext() calls that are being made from
127+
// previously blocked threads.
131128
} catch (RuntimeException onErrorException) {
132129
logger.warn(
133130
"Encountered unexpected error {} when cancelling due to error.",

0 commit comments

Comments
 (0)