You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@geode.apache.org by GitBox <gi...@apache.org> on 2021/05/21 13:22:01 UTC

[GitHub] [geode] upthewaterspout commented on a change in pull request #6500: GEODE-8870: Removes GFE_70.

upthewaterspout commented on a change in pull request #6500:
URL: https://github.com/apache/geode/pull/6500#discussion_r636913061



##########
File path: geode-core/src/main/java/org/apache/geode/internal/cache/persistence/DiskInitFileParser.java
##########
@@ -567,24 +568,20 @@ private void readEndOfRecord(DataInput di) throws IOException {
     }
   }
 
-  private PersistentMemberID readPMID(CountingDataInputStream dis, KnownVersion gfversion)
+  private PersistentMemberID readPMID(CountingDataInputStream dis)
       throws IOException, ClassNotFoundException {
     int len = dis.readInt();
     byte[] buf = new byte[len];
     dis.readFully(buf);
-    return bytesToPMID(buf, gfversion);
+    return bytesToPMID(buf);
   }
 
-  private PersistentMemberID bytesToPMID(byte[] bytes, KnownVersion gfversion)
+  private PersistentMemberID bytesToPMID(byte[] bytes)
       throws IOException, ClassNotFoundException {
     ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
     DataInputStream dis = new DataInputStream(bais);
     PersistentMemberID result = new PersistentMemberID();
-    if (KnownVersion.GFE_70.compareTo(gfversion) > 0) {
-      result._fromData662(dis);
-    } else {
-      InternalDataSerializer.invokeFromData(result, dis);
-    }
+    InternalDataSerializer.invokeFromData(result, dis);

Review comment:
       In general, when we read from disk or the network we should be creating a VersionedDataInputStream. That allows us to make DataSerializableFixedId objects backwards compatible just by adding special fromData_Pre_XXX methods.
   
   Maybe we should create one of those here, using gfVersion.




-- 
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.

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