The docs are a little unclear to me regarding what happens when you have a saga associated with a multi-segment tracking event processor and the application is running on multiple nodes. Can someone clarify how this works in current versions of Axon?
1. On any single node, two event processing threads can never execute the same saga instance at the same time even if the saga is listening for events that appear in multiple segments.
2. In a multi-node setup, each node claims a subset of the segments. The specific subset can change over time, but at any given time, each segment is tracked by exactly one node.
But what isn't clear to me is whether there is communication between nodes that would prevent the same saga instance from executing concurrently on two nodes if there are events in multiple segments that need to be handled by the same saga. Is there a distributed locking mechanism or some other guarantee of sequential event handling across multiple nodes?
In Axon 2.x, there wasn't, and I ended up modifying the saga management code to acquire database locks to prevent concurrent execution.