pekko
pekko copied to clipboard
Exposes the current interpreter when init/prestart the stage.
Motivation:
Currently, we can't access the current interpreter when the stage is preStarting. eg using it with Flow.fromMaterializer.
Result: Can access the interpreter when necessary(internalapi).
otherwise when without this:
[ERROR] [01/09/2024 12:09:00.972] [FromMaterializerSpec-pekko.actor.default-dispatcher-6] [pekko://FromMaterializerSpec/system/Materializers/StreamSupervisor-0/flow-0-0-headSink] Error during preStart in [org.apache.pekko.stream.impl.SetupFlowStage$$anon$1-setup(org.apache.pekko.stream.scaladsl-FromMaterializationSpec.scala:149)]: Cannot throw exception because "null" is null
java.lang.NullPointerException: Cannot throw exception because "null" is null
at org.apache.pekko.stream.impl.fusing.GraphInterpreter$.currentInterpreter(GraphInterpreter.scala:129)
at org.apache.pekko.stream.scaladsl.FromMaterializerSpec.$anonfun$new$30(FromMaterializationSpec.scala:149)
at org.apache.pekko.stream.impl.SetupFlowStage$$anon$1.preStart(SetupStage.scala:61)
at org.apache.pekko.stream.impl.fusing.GraphInterpreter.init(GraphInterpreter.scala:321)
at org.apache.pekko.stream.impl.fusing.GraphInterpreterShell.init(ActorGraphInterpreter.scala:631)
at org.apache.pekko.stream.impl.fusing.ActorGraphInterpreter.tryInit(ActorGraphInterpreter.scala:740)
at org.apache.pekko.stream.impl.fusing.ActorGraphInterpreter.preStart(ActorGraphInterpreter.scala:789)
at org.apache.pekko.actor.Actor.aroundPreStart(Actor.scala:558)
at org.apache.pekko.actor.Actor.aroundPreStart$(Actor.scala:558)
at org.apache.pekko.stream.impl.fusing.ActorGraphInterpreter.aroundPreStart(ActorGraphInterpreter.scala:729)
at org.apache.pekko.actor.ActorCell.create(ActorCell.scala:654)
at org.apache.pekko.actor.ActorCell.invokeAll$1(ActorCell.scala:523)
at org.apache.pekko.actor.ActorCell.systemInvoke(ActorCell.scala:545)
at org.apache.pekko.dispatch.Mailbox.processAllSystemMessages(Mailbox.scala:297)
at org.apache.pekko.dispatch.Mailbox.run(Mailbox.scala:232)
at org.apache.pekko.dispatch.Mailbox.exec(Mailbox.scala:245)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1312)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1843)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1808)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:188)
[WARN] [01/09/2024 12:09:01.047] [FromMaterializerSpec-pekko.actor.default-dispatcher-5] [pekko://FromMaterializerSpec/user/StreamSupervisor*] received dead letter from Actor[pekko://FromMaterializerSpec/system/testProbe-1#397573823]: GetChildren
--- Stream actors debug dump ---
Stream is completed. No debug information is available