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

EventSourcedBehavior not failing with DeathPactException for unhandled Terminated() signals #28297

Closed
mvdstam opened this issue Dec 2, 2019 · 3 comments

Comments

@mvdstam
Copy link

@mvdstam mvdstam commented Dec 2, 2019

Hey all,

According to the docs, failures can be bubbled up through the hierarchy of actors. This is done by simply having the parent actor context.watch the child actorRef, and then not handling the Terminated signal when that child dies. This, in turn, will cause the parent actor to fail with a DeathPactException.

Behaviors spawned with the EventSourcedBehavior do not seem to adhere to this rule and silently ignore the Terminated() signals (or at least: don't cause a DeathPactException as is the case with "regular" typed behavior) when they are not handled in the signalHandler. The signals do reach the signalHandler when I define one myself:

(..)
  .receiveSignal {
    case (_, Terminated(ref)) => context.log.info("Child [{}] terminated", ref.path) // This gets logged just fine
  }

This change in behavior caught me off-guard, and I was wondering if this is simply a bug or undocumented behavior in the EventSourcedBehavior.

All of this is tested with Akka 2.6.0. Cheers!

@patriknw

This comment has been minimized.

Copy link
Member

@patriknw patriknw commented Dec 3, 2019

Thanks for reporting. I think it can be a bug.

@helena helena self-assigned this Dec 9, 2019
@helena helena added this to In progress in Akka 2.6.x Dec 9, 2019
@helena

This comment has been minimized.

Copy link
Member

@helena helena commented Dec 10, 2019

Confirming this is seen, working on a fix.

helena added a commit to helena/akka that referenced this issue Dec 11, 2019
helena added a commit to helena/akka that referenced this issue Dec 11, 2019
helena added a commit to helena/akka that referenced this issue Dec 12, 2019
@helena helena moved this from In progress to Reviewing in Akka 2.6.x Dec 12, 2019
@helena helena added this to the 2.6.2 milestone Dec 17, 2019
@helena helena closed this Dec 17, 2019
Akka 2.6.x automation moved this from Reviewing to Done Dec 17, 2019
@mvdstam

This comment has been minimized.

Copy link
Author

@mvdstam mvdstam commented Dec 17, 2019

@helena Thanks so much for the quick fix. Looking forward to the next release!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Akka 2.6.x
  
Done
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.