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

Exposes the current interpreter when init/prestart the stage. #918

Open
He-Pin opened this issue Jan 9, 2024 · 0 comments
Open

Exposes the current interpreter when init/prestart the stage. #918

He-Pin opened this issue Jan 9, 2024 · 0 comments
Assignees
Labels
t:stream Pekko Streams

Comments

@He-Pin
Copy link
Member

He-Pin commented Jan 9, 2024

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
@He-Pin He-Pin self-assigned this Jan 9, 2024
@He-Pin He-Pin added this to the 1.1.0 milestone Jan 9, 2024
@He-Pin He-Pin added the t:stream Pekko Streams label Jan 9, 2024
@He-Pin He-Pin removed this from the 1.1.0 milestone Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t:stream Pekko Streams
Projects
None yet
Development

No branches or pull requests

1 participant