-
Notifications
You must be signed in to change notification settings - Fork 1
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
Awakeable id format changes #47
Conversation
bytes invocation_id = 1; | ||
bytes instance_key = 2; | ||
// Unique id of the invocation. This id is unique across invocations and won't change when replaying the journal. | ||
bytes id = 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This id
in the runtime world is partition_key + invocation_id, but in sdk terms it doesn't really matter, this is just what you need to concatenate with the awakeable index.
dev/restate/service/protocol.proto
Outdated
|
||
// Invocation id that can be used for logging. | ||
// The user can use this id to address this invocation in admin and status introspection apis. | ||
string id_debug = 2; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is used by the SDKs to add info to debug lines. Right now we debug the sid
in the SDK, created by composing the previous fields invocation_id
and instance_key
. With this change, SDKs just need to use this id_debug
. Currently, this will be the sid
serialized but with restatedev/restate#704 in place this will be the partition key + invocation id as base64
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This also gives us flexibility in future to change the id formats in the way we want, without applying sdk changes anymore (same for above comment). Plus it hides a bit the implementation details.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. +1 for merging.
bytes instance_key = 2; | ||
bytes invocation_id = 3; | ||
uint32 entry_index = 4; | ||
// Identifier of the awakeable. See the spec for more details. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe say that this is the base64 encoded form of the awakeable identifier.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure this adds more than what is already described in the spec.
Fix #46, fix #22 as well (I was forced to, in order to remove the old fields)