Skip to content

Commit

Permalink
Bump protocol version
Browse files Browse the repository at this point in the history
  • Loading branch information
slinkydeveloper committed Feb 15, 2024
1 parent 1b26150 commit b8f05e2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

public class MessageHeader {

static final short SUPPORTED_PROTOCOL_VERSION = 0;
static final short SUPPORTED_PROTOCOL_VERSION = 1;

static final short VERSION_MASK = 0x03FF;
static final short DONE_FLAG = 0x0001;
Expand Down
5 changes: 4 additions & 1 deletion sdk-core/src/test/java/dev/restate/sdk/core/ProtoUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ public class ProtoUtils {
*/
public static MessageHeader headerFromMessage(MessageLite msg) {
if (msg instanceof Protocol.StartMessage) {
return new MessageHeader(MessageType.StartMessage, (short) 0, msg.getSerializedSize());
return new MessageHeader(
MessageType.StartMessage,
MessageHeader.SUPPORTED_PROTOCOL_VERSION,
msg.getSerializedSize());
} else if (msg instanceof Protocol.CompletionMessage) {
return new MessageHeader(MessageType.CompletionMessage, (short) 0, msg.getSerializedSize());
}
Expand Down

0 comments on commit b8f05e2

Please sign in to comment.