This repository has been archived by the owner on Sep 12, 2023. It is now read-only.
Alternative policy for dealing with failed actions in process manager #1229
thomaseizinger
started this conversation in
General
Replies: 1 comment 1 reply
-
Sorry I just read this after making a new discussion which might be an alternative solution to this issue: #1434
Isn't contract setup done outside the process manager. The process manager only deals with setup/failed events. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
With #1200, the process manager decouples failures in actions such as
TryBroadcastTransaction
from the actual processing of the event. The rationale for this behaviour is outlined in ADR011.Right now, the action is attempted once and in case it fails, an error is logged. This is obviously not ideal. Many of these actions, if not all of them could be re-attempted and might succeed later if, for example, the error is due to IO failure which are often only temporary.
Re-attempting these actions also ties in well with ADR006. An actor tracking a resource such as the blockchain monitor might be temporarily down or not functioning properly and as a result restarted by a supervising actor. Re-attempting an action such as
TryBroadcastTransaction
would then result in a very resilient system.A related point to this is one of code duplication. At the moment, individual actors such as
monitor
ororacle
hydrate their own state independently on startup from the database. Conceptually though, this functionality is already present in the process manager. For example, after a contract-setup, the transaction needs to be broadcasted.Expressed differently, our process manager is currently actually managing multiple processes. Let's take contract setup as an example again. The process that is modeled here could be - in a simplified way - expressed as:
If we were to model this process somehow then we should be able unify those concerns:
Some questions that come to mind:
Beta Was this translation helpful? Give feedback.
All reactions