I'd vote for option 2 for sure, it's the one that respects the meaning of
"expected state". The code at [2] is more or less misusing the expected
state, saying "I know I should be stopped, but something went wrong, so now
I expect to be on-fire". This is counter to the design of the relationship
Hi Aled.
Option 1 is definitely simpler. While it let the author decide what to do,
it means that each policy has to have an ad-hoc behaviour based on what the
"expected state" value is, which might not reflect the real expected state.
As you said in you example, the expected state is "on-fire"
Hi all,
TL;DR: low-level discussion of error-handling, and entity state; should
we change what we set the entity's "expected state" to when there are
errors?
---
I'm trying to fix https://issues.apache.org/jira/browse/BROOKLYN-534
(when stopping, ensure the `ServiceRestarter` doesn't