Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shapless Extension Completes Before All Data has been passed through #30

Open
natevecc opened this issue Jun 27, 2017 · 1 comment
Open

Comments

@natevecc
Copy link

I ran into an edge case when using the shapeless extensions with Flow.flatMapConcat and one of the flows in the coproductFlow had a broadcast and merge in it.

It seems the CoproductFlexiMerge does not handle the case where a sub flow might push more than one value to it's inlets well. In this setup I think it incorrectly sets itself as being complete after pulling a single value from the inlet and never processes the second output of my internal broadcast/merge graph. In a flow without flatMapConcat this wasn't a problem because the graph just kept running until all data was processed but flatMapConcat seems to shutdown the subgraph as soon as it receives the upStreamComplete message and data can be lost. Sorry I can't give a better explanation as to what's causing the problem. The internals of akka-streams are a mystery to me.

Here's a representation of the graph that caused the problem

Source(foreverData) -> flatMapConcat(data)
  Source.single(data) -> coproductFlow
    -> normal flow ->
                 /-> flow ->\
    -> broadcast             merge -> (this output will now have two values)
                 \-> flow ->/
@Timshel
Copy link
Contributor

Timshel commented Jun 28, 2017

Hi,
I'll try to have a look before the end of the week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants