Skip to content

Retain journal after completion #3250

New issue

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

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

Already on GitHub? # to your account

Closed
wants to merge 6 commits into from

Conversation

slinkydeveloper
Copy link
Contributor

@slinkydeveloper slinkydeveloper commented May 9, 2025

Fix #892

This PR makes sure we store in the completed invocation status the journal length, adds purge journal command, adds support in the cleaner to purge the journal, adds journal retention to invocation request (to be propagated from the schema registry, see followup prs).

TODO for myself to finish this:

  • Evaluate whether we need disabling workflow retention default for 1.4 (because of backward compatibility). This needs version gap
  • Add Admin API endpoint to configure journal retention per service and per handler. Will do in followup
  • Add to discovery manifest config options to tune all the retention parameters both per service and per handler. Will do in followup
  • Introduce something like restate-server --dev, to set journal retention on by default for all invocations during development. We don't do it, I rather do in a followup a hidden flag to enable journal retention for everything by default.
  • Add E2E test for this. Followup
  • Test this works fine with UI. Followup

…his is by default disabled, and enabled when JournalRetentionPolicy::Retain
 Add business logic to remove journal when purging invocation.
This also includes few sensible changes to the internal API InvocationTargetMetadata, to map its values more easily to what the ServiceInvocation supports.
@slinkydeveloper slinkydeveloper changed the title [WIP] Retain journal after completion Retain journal after completion May 22, 2025
}
}

pub fn compute_retention(&self, has_idempotency_key: bool) -> InvocationRetention {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

For the review, this is super important.

@slinkydeveloper
Copy link
Contributor Author

For context, this is the deployment manifest PR: #3295

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.

I accidentally started with the last PR in line and therefore added all my comments to #3296. Some of which might actually apply to this PR. Sorry for this.

@slinkydeveloper
Copy link
Contributor Author

Merged with #3296

@github-actions github-actions bot locked and limited conversation to collaborators May 28, 2025
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support displaying past invocation
2 participants