Hi, after recent akka version update, I start seeing this error akka.stream.SubscriptionWithCancelException$NoMoreElementsNeeded$
.
Looking at Akka 2.6.15 - akka.stream.Attributes.CancellationStrategy, it seems to be a new behavior for 2.6.x. The default is PropagateFailure
, which is not configurable, has this documentation:
Strategy that treats cancelStage in different ways depending on the cause that was given to the cancellation.
If the cause was a regular, active cancellation (SubscriptionWithCancelException.NoMoreElementsNeeded), the stage receiving this cancellation is completed regularly.
If another cause was given, this is treated as an error and the behavior is the same as with failStage.
So it seems it shouldn’t raise this error to user level. What am I missing? I have tried with 2.6.10, 2.6.15 etc after seeing this akka/akka#30071 but it doesn’t help in my case.
My code look like this:
S3.download(bucket = bucket, key = key)
.collect {
case Some((byteStringSource, _)) => byteStringSource
}
.flatMapConcat(identity)
.via(flow)
.grouped(10000)
.mapAsyncUnordered(parallelism = 2) { items =>
doSomething(items)
}
.runWith(Sink.ignore)
It always runs fine on my local but fails with the above exception on production (in AWS + k8s). With the same input, it fails at different time. Sometime it fails at 90% stream completion, sometimes 99%.
Am I missing something? How should I handle this error?
1 post - 1 participant