Skip to content

Commit

Permalink
Squashed 'service-protocol/' changes from 89224c6..0d6b476
Browse files Browse the repository at this point in the history
0d6b476 Update retry count comment
0d35aad Add fields for the Side effect retry feature (#95)

git-subtree-dir: service-protocol
git-subtree-split: 0d6b476ea4bb78253fb21edcf151d9c401aecdb1
  • Loading branch information
slinkydeveloper committed Aug 28, 2024
1 parent b358b2c commit c803edf
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions service-protocol/dev/restate/service/protocol.proto
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ enum ServiceProtocolVersion {
SERVICE_PROTOCOL_VERSION_UNSPECIFIED = 0;
// initial service protocol version
V1 = 1;
// Added
// * Entry retry mechanism: ErrorMessage.next_retry_delay, StartMessage.retry_count_since_last_stored_entry and StartMessage.duration_since_last_stored_entry
V2 = 2;
}

// --- Core frames ---
Expand Down Expand Up @@ -47,6 +50,18 @@ message StartMessage {

// If this invocation has a key associated (e.g. for objects and workflows), then this key is filled in. Empty otherwise.
string key = 6;

// Retry count since the last stored entry.
//
// Please note that this count might not be accurate, as it's not durably stored,
// thus it might get reset in case Restate crashes/changes leader.
uint32 retry_count_since_last_stored_entry = 7;

// Duration since the last stored entry, in milliseconds.
//
// Please note this duration might not be accurate,
// and might change depending on which Restate replica executes the request.
uint64 duration_since_last_stored_entry = 8;
}

// Type: 0x0000 + 1
Expand Down Expand Up @@ -90,6 +105,10 @@ message ErrorMessage {
optional string related_entry_name = 5;
// Entry type.
optional uint32 related_entry_type = 6;

// Delay before executing the next retry, specified as duration in milliseconds.
// If provided, it will override the default retry policy used by Restate's invoker ONLY for the next retry attempt.
optional uint64 next_retry_delay = 8;
}

// Type: 0x0000 + 4
Expand Down

0 comments on commit c803edf

Please sign in to comment.