Skip to content

Venya/fix-invoke-by-reminder-but-no-state#97

Merged
VenyaBrodetskiy merged 2 commits intomasterfrom
venya/fix-invoke-by-reminder-but-no-state
Jan 8, 2025
Merged

Venya/fix-invoke-by-reminder-but-no-state#97
VenyaBrodetskiy merged 2 commits intomasterfrom
venya/fix-invoke-by-reminder-but-no-state

Conversation

@VenyaBrodetskiy
Copy link
Collaborator

Fixed edge case when Saga couldn't recover in case it was invoked by reminder, but State was deleted (by ttl or other reason)

…reminder, but State was deleted (by ttl or other reason)
@@ -115,7 +115,8 @@ protected override async Task OnPreActorMethodAsync(ActorMethodContext actorMeth
{
Saga = null; //just in case
Saga = ReBuildSaga();
Copy link
Collaborator

Choose a reason for hiding this comment

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

We do not need to rebuild the saga in a case of no state; the question is if it is worth the complexity of having a dedicated check. We could create a method to check the state's existence, call it as the first method in the function, and rebuild the saga if it is really needed.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

nice idea
@SubZeroX9 wanna help with it please? 🙏

@VenyaBrodetskiy VenyaBrodetskiy merged commit a2c68fb into master Jan 8, 2025
1 check passed
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.

2 participants