-
Notifications
You must be signed in to change notification settings - Fork 6
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
Add Eager state support #87
Conversation
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.
Thanks for creating this PR @slinkydeveloper. The changes look good to me. Only the MessageHeader::fromMessage
looks a bit dangerous right now. Maybe we need to change this method slightly or enrich the StartMessage
with more information.
sdk-core-impl/src/main/java/dev/restate/sdk/core/impl/MessageHeader.java
Outdated
Show resolved
Hide resolved
sdk-core-impl/src/main/java/dev/restate/sdk/core/impl/MessageHeader.java
Outdated
Show resolved
Hide resolved
} | ||
} | ||
|
||
@Override | ||
public void cancel() {} | ||
|
||
static MessageHeader headerFromMessage(MessageLite msg) { |
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.
Here I copy-pasted the method, rather than using what's in ProtoUtils
, to avoid adding the dependency on the test jar (as this package is supposed to be published).
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.
The changes look good to me. There seems to be a violation of the introduced invarian that the SDK must not send a completion message.
2bb068b
to
4b3b38e
Compare
* Support MessageHeader.PARTIAL_STATE_FLAG * Propagate the MessageHeader to the state machine * Implement LocalStateStorage and wire it up * Add the EagerStateTest * Modified the `MessageHeader#fromMessage` to be safer.
4b3b38e
to
53bc0d0
Compare
* Support MessageHeader.PARTIAL_STATE_FLAG * Propagate the MessageHeader to the state machine * Implement LocalStateStorage and wire it up * Add the EagerStateTest * Modified the `MessageHeader#fromMessage` to be safer.
53bc0d0
to
58d06b4
Compare
….a4a8596e a4a8596e Now side effect is part of the protocol (#87) 494f765c Format fec17c9e Change x-restate-user-agent to x-restate-server, to be similar to https://www.rfc-editor.org/rfc/rfc9110#field.server git-subtree-dir: sdk-core/src/main/service-protocol git-subtree-split: a4a8596eab8c554dce0f8f0f1020d5ddc623a305
Fix #86