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
Missing ChildActorExited messages #39
Comments
The troupe leader handles the ChildActorExited messages for all of the troupe workers, so your ChildActorExited handler in SecondaryActor never gets invoked because those aren't passed through from the troupe leader management. The troupe leader never exits, so PrimaryActor doesn't receive a ChildActorExited. The troupe workers are ephemeral, being created on demand and destroyed on lack of demand, so each one can create assistant actors but the assistant actors will be destroyed along with themselves. The workers will receive those ChildActorExited messages, so if SecondaryActor had created child actors you would have seen logging for those. |
Also I realize this confusion might have been caused by some of my earlier advice on the other issue where I did recommend handling the ChildActorExited, so I apologize for the mixed messaging. With the recent change in the troupe that you inspired, the troupe management is more reliable and should work as I described above, and I have taken an action item to document this more clearly. |
Ahh I think I understand. The reason this came up was because some tests broke in a subtle way after the recent upgrade. The tests were relying on picking up log entries triggered by ChildActorExited. I thought it was maybe something I had done unwittingly but it sounds like the Thespian changes make this approach no longer possible in determining when a child actor has finished its work. I will take a look at the code and see if I can modify the test to find a different way of detecting once the work has been done. |
hmm....I think this could be quite difficult to fix without knowing when a child actor has exited. So just to be clear, the troupe leader and the secondary actor are two completely different entities? And the troupe leader has no way of sharing the fact that a troupe member has exited with the secondary actor? |
The The idea is that you can write your SecondaryActor as a normal (non-troupe) actor and things should run just fine. If you discover that SecondaryActor is a bottleneck in your system and it is feasible for it to parallelize the work for messages it receives, you can simply add the One way to clarify your development needs might be to remove/comment-out the The only real considerations when adding the
As an example of #1:
If I send 10 messages to the StatefulActor above, I will get responses of: 1, 2, 3, ..., 10 The StatefulActor is not a good candidate for the As an example of #2:
In this example, the TwoStageActor cannot complete the request until it gets additional information from the HelperActor. To indicate this, it sets the If your use case is more complicated, then the simple |
Thanks for your detailed response on that Kevin. I forgot I hadn't come back and closed this one. I solved the issue so thanks! |
Hi Kevin,
I think this might just be me being stupid but I am using the following code:
I would expect to see some logging messages stating the child actors have exited but I get nothing. I just see the send / received messages. Is there something wrong with the code?
Thanks
The text was updated successfully, but these errors were encountered: