-
Notifications
You must be signed in to change notification settings - Fork 3.6k
+str Add flatmapConcat with parallelism. #32024
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
base: main
Are you sure you want to change the base?
Conversation
akka-stream/src/main/scala/akka/stream/impl/fusing/StreamOfStreams.scala
Outdated
Show resolved
Hide resolved
|
before: after: |
ae99e81 to
0be8cdd
Compare
|
I wonder if it is possible to write a Buffer.peek(n: Int) which peek from current to n, and by that, is it easy to impl Merge via this, just change |
|
@GreyPlane How about comment in line, thanks |
0be8cdd to
6f2c507
Compare
gael-ft
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the implementation.
This will allow us to have more than 1 source pulled at a time keeping elements ordered from downstream perspective.
akka-stream/src/main/scala/akka/stream/impl/fusing/StreamOfStreams.scala
Outdated
Show resolved
Hide resolved
akka-stream/src/main/scala/akka/stream/impl/fusing/StreamOfStreams.scala
Outdated
Show resolved
Hide resolved
6f2c507 to
135ee1f
Compare
|
Seems should add another parameter |
Not obvious to me. So I can't see a scenario where you would like to continue after one of the upstream sources cancelled when using this operator. That being said, if you feel that could be useful, let's go 😉 |
|
@gael-ft that's true. but I saw your PR and you can return And for most case, I think we should make the I was wantted to optimize for |
|
@He-Pin I might be a bit too much use case centric (i.e. S3 object upload where we don't want any missing part).
So this question can probably be a valid question in some cases. But regarding the default value of In my understanding of Once again, just my opinion, but as long as this is parameter, users can use it as they want. |
|
@gael-ft Yes, let's just keep it simple for now. And I saw the |
akka-stream/src/main/scala/akka/stream/impl/fusing/StreamOfStreams.scala
Outdated
Show resolved
Hide resolved
akka-stream/src/main/scala/akka/stream/impl/fusing/StreamOfStreams.scala
Outdated
Show resolved
Hide resolved
akka-stream/src/main/scala/akka/stream/impl/fusing/StreamOfStreams.scala
Outdated
Show resolved
Hide resolved
akka-stream/src/main/scala/akka/stream/impl/fusing/StreamOfStreams.scala
Outdated
Show resolved
Hide resolved
7d4965b to
9813a33
Compare
akka-stream-tests/src/test/scala/akka/stream/scaladsl/FlowFlatMapConcatSpec.scala
Outdated
Show resolved
Hide resolved
akka-stream/src/main/scala/akka/stream/impl/fusing/StreamOfStreams.scala
Outdated
Show resolved
Hide resolved
akka-stream/src/main/scala/akka/stream/impl/fusing/StreamOfStreams.scala
Outdated
Show resolved
Hide resolved
akka-stream/src/main/scala/akka/stream/impl/fusing/StreamOfStreams.scala
Outdated
Show resolved
Hide resolved
akka-stream/src/main/scala/akka/stream/impl/fusing/StreamOfStreams.scala
Outdated
Show resolved
Hide resolved
akka-stream/src/main/scala/akka/stream/impl/fusing/StreamOfStreams.scala
Outdated
Show resolved
Hide resolved
bd40615 to
92172b4
Compare
cfd75c9 to
05d5b17
Compare
|
@gael-ft @johanandren @patriknw I think it's ready now, and happy new year. |
78bda86 to
8103cbc
Compare
ea3ca90 to
ec4d0c0
Compare
| .statefulMap(() => -1)((pre, current) => { | ||
| if (pre + 1 != current) { | ||
| throw new IllegalStateException(s"expected $pre + 1 == $current") | ||
| } | ||
| (current, current) | ||
| }, _ => None) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check the ordering
3ffe355 to
5e084f4
Compare
5e084f4 to
9ed93c5
Compare
|
Sorry for not reviewing this yet, busy day, we'll get there eventually so please be patient. |
|
@johanandren take easy, $Work first :) |
References #31958
was: #31602
I ran the tests after changing the default
flatMapConcattoFlattenConcat; the tests passed, too.