Skip to content
This repository has been archived by the owner on Mar 16, 2022. It is now read-only.

Avoid dead letter logs on event-sourced entity passivation #390

Merged
merged 2 commits into from
Jul 22, 2020

Conversation

pvlugter
Copy link
Member

Resolves #389.

When the entity passivates, it sends a Success message to the relay actor for the stream to shut down, it also stops the entity actor. The entity supervisor stops when it sees that the entity manager actor has terminated. But the stream also has an actorRef sink pointing to the supervisor, which sees the supervisor terminate (before the stream has completed) and so fails the stage, sending a Failure message to the already terminated supervisor.

First commit avoids the dead letter log by using a StreamFailed message with DeadLetterSuppression, like the StreamClosed message.

But since we may actually want the stream to drain and complete cleanly, second commit updates the entity stop to be more graceful around stream termination.

We'll still want some tests for entity passivation. Tracked in #359.

ralphlaude added a commit to ralphlaude/cloudstate that referenced this pull request Jul 12, 2020
@pvlugter pvlugter force-pushed the passivation-dead-letter branch 3 times, most recently from 31e1888 to 855192a Compare July 16, 2020 06:02
@pvlugter pvlugter force-pushed the passivation-dead-letter branch from 855192a to 1020fc0 Compare July 16, 2020 06:45
@pvlugter pvlugter merged commit 1081468 into cloudstateio:master Jul 22, 2020
@pvlugter pvlugter deleted the passivation-dead-letter branch July 22, 2020 22:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dead letter log on entity passivation
1 participant