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

Actors discard all exsting messages in the mailbox while shutdown #473

Open
contrun opened this issue Jan 14, 2025 · 0 comments
Open

Actors discard all exsting messages in the mailbox while shutdown #473

contrun opened this issue Jan 14, 2025 · 0 comments

Comments

@contrun
Copy link
Collaborator

contrun commented Jan 14, 2025

We use ActorCell::stop_children_and_wait to stop all children actors in https://github.com/contrun/fiber/blob/8978c15308106ff5b93df9ef0479ac5b6c628fa6/src/actors.rs#L53-L55. The problem of this is that we will run post_stop function of the actor and discard all messages in the mailbox. So it is possible the channel actor successfully processed the CommitmentSigned from a peer, and then sent a command to network actor to send a RevokeAndAck message, but this command was placed in the mailbox and discarded while shutting down.

It is a nice-to-have that we try some efforts to process existing messages in the actor mailboxes while shutting down. As far as I can tell, ractor does not have any infrastructure to accomplish this easily.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant