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

Fix idempotent send with delay #1843

Merged

Conversation

slinkydeveloper
Copy link
Contributor

@slinkydeveloper slinkydeveloper commented Aug 15, 2024

Fix #1678

This PR essentially reorganizes the code around handling the folllowing events in the state machine:

  • Handle the Command::invoke. Now everything is under handle_service_invocation. Of the changes within this code, the important ones are:
  • Handle the new Timer::NeoInvoke

This also includes:

  • Reorganize a bit the code around the inbox handling to unify with the above code
  • Add several tests, including one for the inbox

There's also a bit of reorganization of the NeoInvocationStatus materialized type, to share the common values of Inboxed/Scheduled in a single data structure.

@slinkydeveloper slinkydeveloper changed the title [WIP] Fix idempotent send with delay Fix idempotent send with delay Aug 15, 2024
@slinkydeveloper
Copy link
Contributor Author

Related to this #1844

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.

Great work @slinkydeveloper. The on_service_invocation is structured in a way that makes it a lot easier to understand what's going on. Well done. LGTM. +1 for merging if GHA gives green light.

crates/partition-store/src/invocation_status_table/mod.rs Outdated Show resolved Hide resolved
crates/worker/src/partition/state_machine/mod.rs Outdated Show resolved Hide resolved
crates/worker/src/partition/state_machine/mod.rs Outdated Show resolved Hide resolved
crates/worker/src/partition/state_machine/mod.rs Outdated Show resolved Hide resolved
crates/worker/src/partition/state_machine/mod.rs Outdated Show resolved Hide resolved
crates/worker/src/partition/state_machine/mod.rs Outdated Show resolved Hide resolved
crates/worker/src/partition/state_machine/mod.rs Outdated Show resolved Hide resolved
@slinkydeveloper slinkydeveloper merged commit 78ce01f into restatedev:main Aug 16, 2024
8 checks passed
@slinkydeveloper slinkydeveloper deleted the issues/1678-finally-fix-it branch August 16, 2024 08:01
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.

send with execution delay only responds with invocation id after delay
3 participants