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

Extend delete invocation REST endpoint to support different termination modes #998

Merged
merged 7 commits into from
Dec 19, 2023

Conversation

tillrohrmann
Copy link
Contributor

This PR is based on #995.

This commit extends the existing delete invocation REST endpoint to accept an
additional query parameter mode which allows to select between cancel and kill.
The default is cancel.

This fixes #996.

Copy link
Contributor

@slinkydeveloper slinkydeveloper left a comment

Choose a reason for hiding this comment

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

@tillrohrmann
Copy link
Contributor Author

LGTM, please update the documentation at https://docs.restate.dev/services/invocation/#cancel-an-invocation

Will do via restatedev/documentation#233

@tillrohrmann tillrohrmann force-pushed the issues/996 branch 2 times, most recently from a8475d0 to 6500bc7 Compare December 18, 2023 16:39
This commit extends the JournalTable::get_journal method to also
return the journal index for each journal entry.
This commit introduces a new TerminationFlavor::Cancel which will
gracefully terminate an invocation. The way it works is that only
leaf operations are being terminated with a CANCELED_INVOCATION_ERROR.
Leaf operations are all completable journal entries except for calls
and inboxed invocations. For pending calls in a journal, a cancellation
will propagate the cancellation to these calls.

This commit adds support for canceling inboxed, invoked, suspended and
virtual invocations.

This fixes restatedev#986 and restatedev#943.
This commit fixes an asymmetry in handling completions for virtual
invocations.
This commit enriches the information that is sent from the cancel
REST endpoint to the server. Concretely, it now passes the
InvocationTermination struct which allows to set how an invocation
gets terminated.
…on modes

This commit extends the existing delete invocation REST endpoint to accept an
additional query parameter mode which allows to select between cancel and kill.
The default is cancel.

This fixes restatedev#996.
@tillrohrmann tillrohrmann merged commit a19a7c9 into restatedev:main Dec 19, 2023
2 of 3 checks passed
@tillrohrmann tillrohrmann deleted the issues/996 branch December 19, 2023 11:16
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.

Expose cancel command
2 participants