From b8f05e2c7230111ac2cbf0002b267913c2d1564f Mon Sep 17 00:00:00 2001 From: slinkydeveloper Date: Thu, 15 Feb 2024 10:43:09 +0100 Subject: [PATCH] Bump protocol version --- .../src/main/java/dev/restate/sdk/core/MessageHeader.java | 2 +- sdk-core/src/test/java/dev/restate/sdk/core/ProtoUtils.java | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/sdk-core/src/main/java/dev/restate/sdk/core/MessageHeader.java b/sdk-core/src/main/java/dev/restate/sdk/core/MessageHeader.java index de6de0bd..96e00bf4 100644 --- a/sdk-core/src/main/java/dev/restate/sdk/core/MessageHeader.java +++ b/sdk-core/src/main/java/dev/restate/sdk/core/MessageHeader.java @@ -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; diff --git a/sdk-core/src/test/java/dev/restate/sdk/core/ProtoUtils.java b/sdk-core/src/test/java/dev/restate/sdk/core/ProtoUtils.java index 6ad5cc21..54c51fc7 100644 --- a/sdk-core/src/test/java/dev/restate/sdk/core/ProtoUtils.java +++ b/sdk-core/src/test/java/dev/restate/sdk/core/ProtoUtils.java @@ -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()); }