Skip to content

Commit ba7171b

Browse files
Squashed 'sdk-core/src/main/service-protocol/' changes from 1898426f..0d6b476e
0d6b476e Update retry count comment 0d35aad2 Add fields for the Side effect retry feature (#95) 89224c68 Add buf configuration git-subtree-dir: sdk-core/src/main/service-protocol git-subtree-split: 0d6b476ea4bb78253fb21edcf151d9c401aecdb1
1 parent dea6bae commit ba7171b

File tree

3 files changed

+29
-0
lines changed

3 files changed

+29
-0
lines changed

buf.lock

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Generated by buf. DO NOT EDIT.
2+
version: v2

buf.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
version: v2
2+
name: buf.build/restatedev/service-protocol
3+
lint:
4+
use:
5+
- DEFAULT
6+
breaking:
7+
use:
8+
- FILE

sdk-core/src/main/service-protocol/dev/restate/service/protocol.proto

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ enum ServiceProtocolVersion {
1919
SERVICE_PROTOCOL_VERSION_UNSPECIFIED = 0;
2020
// initial service protocol version
2121
V1 = 1;
22+
// Added
23+
// * Entry retry mechanism: ErrorMessage.next_retry_delay, StartMessage.retry_count_since_last_stored_entry and StartMessage.duration_since_last_stored_entry
24+
V2 = 2;
2225
}
2326

2427
// --- Core frames ---
@@ -47,6 +50,18 @@ message StartMessage {
4750

4851
// If this invocation has a key associated (e.g. for objects and workflows), then this key is filled in. Empty otherwise.
4952
string key = 6;
53+
54+
// Retry count since the last stored entry.
55+
//
56+
// Please note that this count might not be accurate, as it's not durably stored,
57+
// thus it might get reset in case Restate crashes/changes leader.
58+
uint32 retry_count_since_last_stored_entry = 7;
59+
60+
// Duration since the last stored entry, in milliseconds.
61+
//
62+
// Please note this duration might not be accurate,
63+
// and might change depending on which Restate replica executes the request.
64+
uint64 duration_since_last_stored_entry = 8;
5065
}
5166

5267
// Type: 0x0000 + 1
@@ -90,6 +105,10 @@ message ErrorMessage {
90105
optional string related_entry_name = 5;
91106
// Entry type.
92107
optional uint32 related_entry_type = 6;
108+
109+
// Delay before executing the next retry, specified as duration in milliseconds.
110+
// If provided, it will override the default retry policy used by Restate's invoker ONLY for the next retry attempt.
111+
optional uint64 next_retry_delay = 8;
93112
}
94113

95114
// Type: 0x0000 + 4

0 commit comments

Comments
 (0)