Propagate stream cancellation causes (#27266)
* base functionality * fix-restart-flow * Fix subSource / subSink cancellation handling * GraphStage-fix * Fix ambiguity between complete and cancellation (for isAvailable / grab) * rename lastCancellationCause * add mima * fix cancellation cause propagation in OutputBoundary * Fix cancellation cause propagation in SubSink * Add cancellation cause logging to Flow.log * add more comments about GraphStage portState internals * Add some assertions in onDownstreamFinish to prevent wrong usage * Also deprecate onDownstreamFinish() so that no one calls the wrong one accidentally * add SubSinkInlet.cancel(cause) * Propagate causes in two other places * Suggest to use `cancel(in, cause)` but don't deprecate old one
This commit is contained in:
parent
6c13949aec
commit
16033eaf5e
17 changed files with 210 additions and 96 deletions
|
|
@ -674,10 +674,9 @@ import org.reactivestreams.Subscriber
|
|||
}
|
||||
}
|
||||
}
|
||||
override def onDownstreamFinish(): Unit = {
|
||||
if (!isClosed(in)) {
|
||||
cancel(in)
|
||||
}
|
||||
|
||||
override def onDownstreamFinish(cause: Throwable): Unit = {
|
||||
if (!isClosed(in)) cancel(in, cause)
|
||||
maybeCompleteStage()
|
||||
}
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue