rpuch commented on code in PR #5083:
URL: https://github.com/apache/ignite-3/pull/5083#discussion_r1939143590


##########
modules/raft-api/src/main/java/org/apache/ignite/internal/raft/RaftGroupConfigurationSerializer.java:
##########
@@ -59,8 +70,17 @@ private static void writeNullableStringList(@Nullable 
List<String> strings, Igni
 
     @Override
     protected RaftGroupConfiguration readExternalData(byte protoVer, 
IgniteDataInput in) throws IOException {
-        long index = in.readLong();
-        long term = in.readLong();
+        long index;
+        long term;
+
+        if (protoVer == 2) {

Review Comment:
   ```suggestion
           if (protoVer >= 2) {
   ```



##########
modules/raft-api/src/main/java/org/apache/ignite/internal/raft/RaftGroupConfigurationSerializer.java:
##########
@@ -32,6 +32,17 @@ public class RaftGroupConfigurationSerializer extends 
VersionedSerializer<RaftGr
     /** Serializer instance. */
     public static final RaftGroupConfigurationSerializer INSTANCE = new 
RaftGroupConfigurationSerializer();
 
+    /** Unknown index value. */
+    private static final long UNKNOWN_INDEX = -1L;
+
+    /** Unknown term value. */
+    private static final long UNKNOWN_TERM = -1L;

Review Comment:
   These seem to belong to `RaftGroupConfiguration` itself and be public as 
some code external to raft (and our additions to raft) will use them to handle 
'no index+term information' situation.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to