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 TimerKind to support different types of timers #1480

Merged
merged 7 commits into from
Apr 30, 2024

Commits on Apr 30, 2024

  1. Replace custom InvocationId encoding with Protobuf in storage

    This commit changes how we store the InvocationId in the partition storage
    from a custom encoding to using Protobuf. Thereby, we will be able to evolve
    the InvocationId in the future if needed.
    
    This fixes restatedev#1478.
    tillrohrmann committed Apr 30, 2024
    Configuration menu
    Copy the full SHA
    11d8c2f View commit details
    Browse the repository at this point in the history
  2. Make Timer::CompleteSleepEntry value self-contained

    This commit makes the Timer::CompleteSleepEntry contain the full InvocationId
    and the journal entry index to make it self-contained. This simplifies the change
    of the TimerKey in a follow-up commit.
    tillrohrmann committed Apr 30, 2024
    Configuration menu
    Copy the full SHA
    0f325fd View commit details
    Browse the repository at this point in the history
  3. Remove TimerKeyWrapper since it is no longer needed

    The TimerKey struct now directly implements the TimerKey trait used by
    the timer service.
    tillrohrmann committed Apr 30, 2024
    Configuration menu
    Copy the full SHA
    2bcec0f View commit details
    Browse the repository at this point in the history
  4. Introduce TimerKind to support different types of timers

    The TimerKind is used to store differently typed timers. Currently,
    we support journal scoped timers that are scoped to a certain journal
    entry. Additionally, we support invocation scoped timers that are scoped
    to an invocation (e.g. only a single timer for a given wake up time for
    a given invocation can exist).
    
    This fixes restatedev#1417.
    tillrohrmann committed Apr 30, 2024
    Configuration menu
    Copy the full SHA
    0b5d40e View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    f881aa2 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    75653c5 View commit details
    Browse the repository at this point in the history
  7. Make the relationship between Timer and TimerKey more explicit

    This commit introduces factory methods on the Timer which creates the right
    timer kind and corresponding timer key. This prevents the accidental mixup
    of Timers with their keys.
    tillrohrmann committed Apr 30, 2024
    Configuration menu
    Copy the full SHA
    6ea99f1 View commit details
    Browse the repository at this point in the history