[
https://issues.apache.org/jira/browse/PHOENIX-5605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16990263#comment-16990263
]
Chinmay Kulkarni commented on PHOENIX-5605:
-------------------------------------------
[~larsh] Well if autoUpgrade is enabled, then as soon as a 4.15 client connects
to a 4.15 jar server (but with 4.14 metadata), it would cause the metadata
upgrade to make it 4.15 automatically, without any exceptions being thrown.
But, if an old version client is connecting to a server which never had a 4.15
client connection before, then using the client version to indicate that we
should use SYSCAT and not SYS.CHILD_LINK should be sufficient.
Basically, if you connected to a 4.14 schema server from a 4.15 client, then
either:
# AutoUpgrade is disabled, so UpgradeRequiredException is thrown, at which
point the client has no choice but to explicitly run "EXECUTE UPGRADE", after
which the metadata will be up-to-date.
# AutoUpgrade is enabled, so as soon as the 4.15 client connects, metadata will
get updated.
So I think we should be covered in all cases if we just use the client version.
> 4.14 Client can't add a column to a table on a 4.15 server
> ----------------------------------------------------------
>
> Key: PHOENIX-5605
> URL: https://issues.apache.org/jira/browse/PHOENIX-5605
> Project: Phoenix
> Issue Type: Bug
> Affects Versions: 4.15.0
> Reporter: Geoffrey Jacoby
> Assignee: Chinmay Kulkarni
> Priority: Blocker
> Fix For: 4.15.0
>
> Attachments: 5605-hack-4.x-HBase-1.5.txt,
> PHOENIX-5605-4.x-HBase-1.3-v1.patch
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> I took a fresh HBase cluster with the 4.15 Phoenix server, and connected to
> it for the first time with a 4.14 client, which created the 4.14-era system
> tables. I then ran an internal tool to apply the DDL for my use case.
> It was able to successfully create a non-system table, but I got a
> TableNotFoundException trying to add a column to that table in an ALTER
> statement.
> {code:java}
> org.apache.hadoop.hbase.TableNotFoundException:
> org.apache.hadoop.hbase.TableNotFoundException: Table 'SYSTEM.CHILD_LINK' was
> not found, got: SYSTEM.CATALOG.
> at
> org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation.locateRegionInMeta(ConnectionManager.java:1357)
> at
> org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation.locateRegion(ConnectionManager.java:1223)
> at
> org.apache.hadoop.hbase.client.CoprocessorHConnection.locateRegion(CoprocessorHConnection.java:41)
> at
> org.apache.hadoop.hbase.client.RpcRetryingCallerWithReadReplicas.getRegionLocations(RpcRetryingCallerWithReadReplicas.java:357)
> at
> org.apache.hadoop.hbase.client.ScannerCallableWithReplicas.call(ScannerCallableWithReplicas.java:162)
> at
> org.apache.hadoop.hbase.client.ScannerCallableWithReplicas.call(ScannerCallableWithReplicas.java:58)
> at
> org.apache.hadoop.hbase.client.RpcRetryingCaller.callWithoutRetries(RpcRetryingCaller.java:231)
> at
> org.apache.hadoop.hbase.client.ClientScanner.call(ClientScanner.java:273)
> at
> org.apache.hadoop.hbase.client.ClientScanner.loadCache(ClientScanner.java:434)
> at
> org.apache.hadoop.hbase.client.ClientScanner.next(ClientScanner.java:308)
> at org.apache.phoenix.util.ViewUtil.findRelatedViews(ViewUtil.java:125)
> at org.apache.phoenix.util.ViewUtil.findAllRelatives(ViewUtil.java:96)
> at org.apache.phoenix.util.ViewUtil.findAllRelatives(ViewUtil.java:90)
> at
> org.apache.phoenix.coprocessor.MetaDataEndpointImpl.findAllChildViews(MetaDataEndpointImpl.java:2119)
> at
> org.apache.phoenix.coprocessor.MetaDataEndpointImpl.mutateColumn(MetaDataEndpointImpl.java:2508)
> at
> org.apache.phoenix.coprocessor.MetaDataEndpointImpl.addColumn(MetaDataEndpointImpl.java:2799)
> at
> org.apache.phoenix.coprocessor.generated.MetaDataProtos$MetaDataService.callMethod(MetaDataProtos.java:17248)
> at
> org.apache.hadoop.hbase.regionserver.HRegion.execService(HRegion.java:8528)
> at
> org.apache.hadoop.hbase.regionserver.RSRpcServices.execServiceOnRegion(RSRpcServices.java:2282)
> at
> org.apache.hadoop.hbase.regionserver.RSRpcServices.execService(RSRpcServices.java:2264)
> at
> org.apache.hadoop.hbase.protobuf.generated.ClientProtos$ClientService$2.callBlockingMethod(ClientProtos.java:36808)
> at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:2399)
> at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:124)
> at
> org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:311)
> at
> org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:291)
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
> at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
> at
> org.apache.hadoop.ipc.RemoteException.instantiateException(RemoteException.java:106)
> at
> org.apache.hadoop.ipc.RemoteException.unwrapRemoteException(RemoteException.java:95)
> at
> org.apache.hadoop.hbase.protobuf.ProtobufUtil.makeIOExceptionOfException(ProtobufUtil.java:368)
> at
> org.apache.hadoop.hbase.protobuf.ProtobufUtil.getRemoteException(ProtobufUtil.java:327)
> at
> org.apache.hadoop.hbase.protobuf.ProtobufUtil.execService(ProtobufUtil.java:1737)
> at
> org.apache.hadoop.hbase.ipc.RegionCoprocessorRpcChannel$1.call(RegionCoprocessorRpcChannel.java:100)
> at
> org.apache.hadoop.hbase.ipc.RegionCoprocessorRpcChannel$1.call(RegionCoprocessorRpcChannel.java:90)
> at
> org.apache.hadoop.hbase.client.RpcRetryingCaller.callWithRetries(RpcRetryingCaller.java:137)
> at
> org.apache.hadoop.hbase.ipc.RegionCoprocessorRpcChannel.callExecService(RegionCoprocessorRpcChannel.java:104)
> at
> org.apache.hadoop.hbase.ipc.CoprocessorRpcChannel.callMethod(CoprocessorRpcChannel.java:56)
> at
> org.apache.phoenix.coprocessor.generated.MetaDataProtos$MetaDataService$Stub.addColumn(MetaDataProtos.java:16679)
> at
> org.apache.phoenix.query.ConnectionQueryServicesImpl$10.call(ConnectionQueryServicesImpl.java:1961)
> at
> org.apache.phoenix.query.ConnectionQueryServicesImpl$10.call(ConnectionQueryServicesImpl.java:1949)
> at org.apache.hadoop.hbase.client.HTable$15.call(HTable.java:1768)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> at java.lang.Thread.run(Thread.java:748){code}
>
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)