[ 
https://issues.apache.org/jira/browse/DRILL-4596?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15236170#comment-15236170
 ] 

ASF GitHub Bot commented on DRILL-4596:
---------------------------------------

Github user yufeldman commented on a diff in the pull request:

    https://github.com/apache/drill/pull/474#discussion_r59297387
  
    --- Diff: 
common/src/main/java/org/apache/drill/common/util/DrillVersionInfo.java ---
    @@ -49,10 +53,52 @@ public static String getVersion() {
             }
           }
         } catch (IOException except) {
    -      appVersion = "Unknown";
    +      appVersion = UNKNOWN_VERSION;
         }
         return appVersion;
       }
     
    +  /**
    +   * Compare two Drill versions disregarding build number and comparing 
only major and minor versions.
    +   * Versions are considered to be compatible:
    +   * 1. if current version is the same as version to compare.
    +   * 2. if current version minor version + 1 is the same as version to 
compare.
    +   */
    +  public static boolean isVersionsCompatible(String currentVersion, String 
versionToCompare) {
    +    if (currentVersion != null && currentVersion.equals(versionToCompare)) 
{
    +      return true;
    +    }
    +
    +    BigDecimal currentVersionDecimal = getVersionAsDecimal(currentVersion);
    +    BigDecimal versionToCompareDecimal = 
getVersionAsDecimal(versionToCompare);
    +
    +    if (currentVersionDecimal != null && versionToCompareDecimal != null) {
    --- End diff --
    
    So for Drillbit with version 1.6 Drillbit with version 1.7 will be 
included, while for a Drillbit with version 1.7 Drillbit with version 1.6 will 
not be included?  Does it mean that at any particular time a particular 
Drillbit will have different view on the cluster from some other Drillbit?


> Drill should do version check among drillbits
> ---------------------------------------------
>
>                 Key: DRILL-4596
>                 URL: https://issues.apache.org/jira/browse/DRILL-4596
>             Project: Apache Drill
>          Issue Type: New Feature
>    Affects Versions: 1.6.0
>            Reporter: Arina Ielchiieva
>            Assignee: Arina Ielchiieva
>             Fix For: Future
>
>
> Before registering new drillbit in zookeeper, we should do version check, and 
> make sure all the running drillbits are in the same version.
> Using drillbits of different version can lead to unexpected results.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to