Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[state machine review] Introduce locks on entities #613

Closed
ndr-brt opened this issue Feb 3, 2022 Discussed in #549 · 1 comment
Closed

[state machine review] Introduce locks on entities #613

ndr-brt opened this issue Feb 3, 2022 Discussed in #549 · 1 comment
Assignees
Milestone

Comments

@ndr-brt
Copy link
Member

ndr-brt commented Feb 3, 2022

We need to introduce the possibility to lock an entity when it's waiting for a response from an async operation (e.g. provision for TransferProcess) so that it won't be fetched by the nextForState method.

This will fix this discussion point:

Discussed in #549

Originally posted by ndr-brt January 25, 2022

The state is not moved to an "not to be processed" state before executing an async operation

Problem
This is the problem described here: #538 . When an entity is fetched from the nextForState and an async operation is called, it should be set in a state that's not fetched by the state machine loop, otherwise that can cause useless loops (as described in the issue)
Solution
Define 3 type of states:

  • To be processed state: an entity with this state is fetched by the nextForState, processed and moved to a processing state (async operation), to another to be processed state (sync operation) or to a final state (nothing else should be done)
  • Processing state: an entity with this state is waiting for an asynchronous response, it's not fetched by the nextForState.
  • Final state: an entity with this state has reached the terminus and there should stay, e.g. states like COMPLETED, ENDED, ERROR, ...
@ndr-brt ndr-brt self-assigned this Feb 3, 2022
@ndr-brt ndr-brt added this to the Milestone 2 milestone Feb 3, 2022
@ndr-brt
Copy link
Member Author

ndr-brt commented Feb 18, 2022

Superseded by #615 as stated in #690

@ndr-brt ndr-brt closed this as completed Feb 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant