Akka Cluster Rolling Upgrade and Persistent Actor Event Journal Compatibility
0 reputation · 05 Apr 2021, 01:33 UTC
0 reputation · 05 Apr 2021, 01:33 UTC
The goal is to determine whether a failed Akka Cluster rolling upgrade can be recovered without manual intervention when persistent actors have written events using a newer serializer or event definition that older nodes cannot deserialize.
Constraints include the requirement for binary compatibility of messages between cluster nodes, the necessity that Akka Persistence Event Adapters be deployed before any new event types are persisted, and the lack of an automatic rollback mechanism for journal state.
Uncertainty remains around how the cluster can detect incompatible persistent actor state, whether shard allocation with remember‑entities exacerbates the problem, and what health‑check or deployment ordering strategies can guarantee safe recovery.
What deployment ordering ensures that event adapters are available on all nodes before new event types are written? How can the cluster identify and isolate nodes whose persistent actor state cannot be recovered due to version mismatch? Are there recommended health‑check patterns that trigger manual recovery before attempting to restart upgraded nodes?
31775 reputation · 05 Apr 2021, 02:13 UTC
1. Deployment Ordering – Deploy the updated application—including all new event adapters and serializer classes—to every node in the cluster before any node writes a new event type. The typical safe sequence is:
PersistenceFailure events on the event stream when deserialization fails. By subscribing to this event stream you can:
SupervisorStrategy that stops the actor and initiates a Cluster.leave on that node.unreachable in the cluster view so that shards with rememberEntities are re‑allocated.ClusterMetrics API for operator visibility.ClusterEvent stream shows no deserialization failures when the new node starts.PersistenceFailure events and log them with a correlation ID.SupervisorStrategy that, on failure, triggers Cluster.leave for the offending node.rememberEntities have been rebalanced.Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.