jinmeiliao commented on a change in pull request #5462:
URL: https://github.com/apache/geode/pull/5462#discussion_r473085253



##########
File path: 
geode-gfsh/src/main/java/org/apache/geode/management/internal/cli/commands/ConnectCommand.java
##########
@@ -168,26 +168,30 @@ public ResultModel connect(
       return result;
     }
 
-    // since 1.14, only allow gfsh to connect to cluster that's older than 1.10
     String remoteVersion = null;
-    String gfshVersion = gfsh.getVersion();
+    String remoteGeodeSerializationVersion = null;
     try {
       remoteVersion = invoker.getRemoteVersion();
-      int minorVersion = Integer.parseInt(versionComponent(remoteVersion, 
VERSION_MINOR));
-      if (versionComponent(remoteVersion, VERSION_MAJOR).equals("1") && 
minorVersion >= 10 ||
-          versionComponent(remoteVersion, VERSION_MAJOR).equals("9") && 
minorVersion >= 9) {
-        InfoResultModel versionInfo = result.addInfo("versionInfo");
-        versionInfo.addLine("You are connected to a cluster of version: " + 
remoteVersion);
-        return result;
+      try {
+        remoteGeodeSerializationVersion = 
invoker.getRemoteGeodeSerializationVersion();

Review comment:
       I think we should try to get the geodeSeriliazationVersion first since 
that's introduced later than the remoteVersion. If we can't get the 
remoteVersion, we definitely would fail at getting the 
remoteGeodeSerilizationVersion




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to