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

Introduce InvocationStatus::Killed #2335

Merged

Conversation

slinkydeveloper
Copy link
Contributor

Fix #2331. While at it I did some lil' refactorings + fixed killing/cancelling scheduled invocations

Copy link
Contributor

@tillrohrmann tillrohrmann left a comment

Choose a reason for hiding this comment

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

Thanks for adding InvocationStatus::Killed to enable the kill with retry feature @slinkydeveloper. Great that you also fixed the issues with killing/cancelling scheduled invocations! The changes look good to me. I left a few comments/suggestions. +1 for merging after resolving them.

Comment on lines +571 to +572
/// If true, original status is Invoked, otherwise is Killed
pub is_invoked: bool,
Copy link
Contributor

Choose a reason for hiding this comment

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

If this were an enum with the explicit variants, then no comment would be needed to explain what true and false means.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think this is fine for the time being, this package is crowded with too many types. I tried to add some enum discriminator already, and it didn't end well naming wise.

Eventually I wanna simply rename InvocationStatus to Invocation, and have an InvocationStatus enum which is just the discriminants, and then here use that enum. I can pull this through in a subsequent PR, but it's a big change and i don't wanna do it now to avoid rebase hell.

@slinkydeveloper slinkydeveloper force-pushed the issues/2331-second-attempt branch from 98a00ee to ee51359 Compare November 29, 2024 18:43
@slinkydeveloper
Copy link
Contributor Author

First commit is just the squash of the previous stuff

Copy link
Contributor

@tillrohrmann tillrohrmann left a comment

Choose a reason for hiding this comment

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

Thanks for addressing my comments @slinkydeveloper. LGTM. +1 for merging.

@slinkydeveloper slinkydeveloper force-pushed the issues/2331-second-attempt branch from 25be1e3 to a2ea0ca Compare December 6, 2024 07:47
Add Killed invocation status to CLI

Fix cancellation/killing of scheduled invocations.

Reply KILLED when receiving attach/get output and deduplication.

Handle killed invocations during leadership change

Plumb the new experimental feature invocation_status_killed.
Also replace the individual booleans for experimental features with enum set.

Add acknowledgment flag to invoker abort command. This makes sure that after a kill, the invoker will send a "terminal" effect to the state machine.

Add experimental feature InvocationStatus::Killed

Add InvocationStatus::Killed
@slinkydeveloper slinkydeveloper force-pushed the issues/2331-second-attempt branch from 4245662 to bf605ea Compare December 6, 2024 08:54
@slinkydeveloper slinkydeveloper merged commit 561679c into restatedev:main Dec 6, 2024
5 checks passed
@slinkydeveloper slinkydeveloper deleted the issues/2331-second-attempt branch December 6, 2024 08:56
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.

Introduce Killed invocation status variant
3 participants