[
https://issues.apache.org/jira/browse/PHOENIX-6500?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17371628#comment-17371628
]
ASF GitHub Bot commented on PHOENIX-6500:
-----------------------------------------
apurtell commented on a change in pull request #1257:
URL: https://github.com/apache/phoenix/pull/1257#discussion_r660960907
##########
File path: phoenix-core/src/main/java/org/apache/phoenix/util/MetaDataUtil.java
##########
@@ -100,6 +101,11 @@
public static final byte[] DATA_TABLE_NAME_PROP_BYTES =
Bytes.toBytes(DATA_TABLE_NAME_PROP_NAME);
+ private static final Map<MajorMinorVersion, MajorMinorVersion>
ALLOWED_SERVER_CLIENT_MAJOR_VERSION =
+ ImmutableMap.of(
+ new MajorMinorVersion(5, 1), new MajorMinorVersion(4, 16)
Review comment:
Per https://phoenix.apache.org/upgrading.html
> An older client (two minor versions back) will work with a newer server
jar when the minor version is different, but not visa versa.
> In other words, clients do not need to be upgraded in lock step with the
server.
Does this mean you also need
new MajorMinorVersion(4, 15)
new MajorMinorVersion(4, 14)
? This 4.16 client might run against a 4.14 server before upgrade, or a 4.15
server before upgrade? If supporting clients two minor versions back.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
> Allow 4.16 client to connect to 5.1 server
> ------------------------------------------
>
> Key: PHOENIX-6500
> URL: https://issues.apache.org/jira/browse/PHOENIX-6500
> Project: Phoenix
> Issue Type: Improvement
> Reporter: Viraj Jasani
> Assignee: Viraj Jasani
> Priority: Major
> Fix For: 4.17.0, 5.2.0, 4.16.2, 5.1.3
>
>
> When 4.16 client tries to connect to 5.1 server, we disallow it based on our
> major version validation b/ old client and new server:
> {code:java}
> Error: ERROR 2006 (INT08): Incompatible jars detected between client and
> server. Major version of client is less than that of the server. Client
> version: 4.16.0; Server version: 5.1.0 (state=INT08,code=2006)
> java.sql.SQLException: ERROR 2006 (INT08): Incompatible jars detected between
> client and server. Major version of client is less than that of the server.
> Client version: 4.16.0; Server version: 5.1.0
> at
> org.apache.phoenix.exception.SQLExceptionCode$Factory$1.newException(SQLExceptionCode.java:608)
> at
> org.apache.phoenix.exception.SQLExceptionInfo.buildException(SQLExceptionInfo.java:217)
> at
> org.apache.phoenix.query.ConnectionQueryServicesImpl.checkClientServerCompatibility(ConnectionQueryServicesImpl.java:1686)
> at
> org.apache.phoenix.query.ConnectionQueryServicesImpl.ensureTableCreated(ConnectionQueryServicesImpl.java:1425)
> at
> org.apache.phoenix.query.ConnectionQueryServicesImpl.createTable(ConnectionQueryServicesImpl.java:1901)
> at
> org.apache.phoenix.schema.MetaDataClient.createTableInternal(MetaDataClient.java:3074)
> at
> org.apache.phoenix.schema.MetaDataClient.createTable(MetaDataClient.java:1105)
> at
> org.apache.phoenix.compile.CreateTableCompiler$CreateTableMutationPlan.execute(CreateTableCompiler.java:421)
> at
> org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:413)
> at
> org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:395)
> at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
> at
> org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:394)
> at
> org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:382)
> at
> org.apache.phoenix.jdbc.PhoenixStatement.executeUpdate(PhoenixStatement.java:1865)
> at
> org.apache.phoenix.query.ConnectionQueryServicesImpl$12.call(ConnectionQueryServicesImpl.java:3245)
> at
> org.apache.phoenix.query.ConnectionQueryServicesImpl$12.call(ConnectionQueryServicesImpl.java:3208)
> at
> org.apache.phoenix.util.PhoenixContextExecutor.call(PhoenixContextExecutor.java:76)
> at
> org.apache.phoenix.query.ConnectionQueryServicesImpl.init(ConnectionQueryServicesImpl.java:3208)
> at
> org.apache.phoenix.jdbc.PhoenixDriver.getConnectionQueryServices(PhoenixDriver.java:255)
> at
> org.apache.phoenix.jdbc.PhoenixEmbeddedDriver.createConnection(PhoenixEmbeddedDriver.java:142)
> at
> org.apache.phoenix.jdbc.PhoenixDriver.connect(PhoenixDriver.java:221)
> at sqlline.DatabaseConnection.connect(DatabaseConnection.java:154)
> at
> sqlline.DatabaseConnection.getConnection(DatabaseConnection.java:202)
> at sqlline.Commands.connect(Commands.java:1165)
> at sqlline.Commands.connect(Commands.java:1055)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at
> sqlline.ReflectiveCommandHandler.execute(ReflectiveCommandHandler.java:38)
> {code}
> Until PHOENIX-6499 is implemented, we should create a map to whitelist
> specific major/minor version of old client to connect with new server.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)