He-Pin commented on code in PR #982:
URL: https://github.com/apache/incubator-pekko/pull/982#discussion_r1459044300
##########
stream/src/main/scala/org/apache/pekko/stream/impl/fusing/Ops.scala:
##########
@@ -267,9 +266,8 @@ private[stream] object Collect {
} catch {
case NonFatal(ex) =>
decider(ex) match {
- case Supervision.Stop => failStage(ex)
- case Supervision.Resume => if (!hasBeenPulled(in)) pull(in)
- case Supervision.Restart => if (!hasBeenPulled(in)) pull(in)
Review Comment:
There is no need to check the `(!hasBeenPulled(in))` , because there is no
additional `pull(in)`. these method was copied from the old code, where, an
exception maybe throw during the `preStart` but the upstream has been pulled.
but here, as the `collect` operator never do some pulling or any other things
which can throws after a `pull(in)`, so I think it would be better to just
remove those duplicated check.
That's why I remove it.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]