Skip to content

Conversation

@gvdongen
Copy link
Contributor

Fix for #52
The issue: In the case of a replay of messages that do not require completion (e.g. set state and then output response),
the state machine did not wait until the replay had finished before sending back the response and closing the state machine.
So if the set state had to be replayed, then the user code just skipped it and continued to send back the response.

Fix: wait for all the promises in the pending messages map to be resolved before sending back the response.
This avoids warnings like State machine is closed. Cancelling all execution. And makes sure journal mismatch checks are always done.

@gvdongen gvdongen added this to the 1A milestone May 24, 2023
@gvdongen gvdongen self-assigned this May 24, 2023
@gvdongen gvdongen requested a review from jackkleeman May 24, 2023 06:32
}
}

storePendingMsg(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a really good idea!

@gvdongen gvdongen merged commit 4ee0e6b into main May 24, 2023
@gvdongen gvdongen deleted the issue#52 branch May 24, 2023 11:23
@gvdongen gvdongen linked an issue May 24, 2023 that may be closed by this pull request
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 this pull request may close these issues.

Improve logging after restate is re-started.

3 participants