[ https://issues.apache.org/jira/browse/DRILL-4596?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15232605#comment-15232605 ]
ASF GitHub Bot commented on DRILL-4596: --------------------------------------- Github user sudheeshkatkam commented on a diff in the pull request: https://github.com/apache/drill/pull/474#discussion_r59065316 --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/server/Drillbit.java --- @@ -207,6 +209,28 @@ private void javaPropertiesToSystemOptions() { } /** + * Disallow registering drillbit when: + * 1. version is unknown; + * 2. drillbit with different version has been already registered. + */ + private void checkVersion(DrillbitEndpoint endpoint) throws DrillbitStartupException { + String currentVersion = endpoint.getVersion(); + if (DrillVersionInfo.UNKNOWN_VERSION.equals(currentVersion)) { + throw new DrillbitStartupException("Drillbit version is unknown."); + } + + for (DrillbitEndpoint registeredEnpoint : coord.getAvailableEndpoints()) { + if (!currentVersion.equals(registeredEnpoint.getVersion())) { --- End diff -- How does this check work with regards to [protobuf backwards compatibility](https://developers.google.com/protocol-buffers/docs/javatutorial#extending-a-protocol-buffer)? Endpoints currently do not have a version. So if two bits (A and B), one with and one without this change, are started, the two start order cases (A after B, and B after A) should pass. > 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)