-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
Problem
The current linkCapsules(...) method performs two separate lightweight transactions (LWTs) with manual rollback. If the service crashes between these operations or if the rollback fails, it can leave capsules in an inconsistent state (e.g., capsule A points to B, but B does not point back to A).
This inconsistency breaks chain navigation and can lead to incorrect application behavior.
Proposed Solution
Implement a Persistent Saga to ensure reliable and recoverable capsule linking:
- Persist saga state before and after each LWT operation
- Track which steps have completed
- On failure or application restart, detect and resume incomplete sagas
- Add appropriate logging and recovery mechanisms
Affected Components
- CapsuleChainService
- CapsuleChainRepository
- New: Saga state entity, repository, and recovery logic
Reactions are currently unavailable