From a5957a188273aa192f44ca37dcf963271e39c5fa Mon Sep 17 00:00:00 2001 From: slinkydeveloper Date: Mon, 19 Aug 2024 17:20:12 +0200 Subject: [PATCH] Add fields for the Side effect retry feature --- dev/restate/service/protocol.proto | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/dev/restate/service/protocol.proto b/dev/restate/service/protocol.proto index 333a36e..6e2a36e 100644 --- a/dev/restate/service/protocol.proto +++ b/dev/restate/service/protocol.proto @@ -47,6 +47,19 @@ 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 not this count might not be accurate, as it's not durably stored, + // thus it's susceptible to Restate's crashes/leader election changes. + uint32 retry_count_since_last_stored_entry = 7; + + // Duration since the last stored entry. + // The time is set as duration since UNIX Epoch in milliseconds. + // + // Please note this time 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 @@ -90,6 +103,11 @@ message ErrorMessage { optional string related_entry_name = 5; // Entry type. optional uint32 related_entry_type = 6; + + // When to execute the next retry. + // If provided, it will override the default retry policy used by Restate's invoker. + // The time is set as duration since UNIX Epoch in milliseconds. + optional uint64 next_retry_at = 8; } // Type: 0x0000 + 4