[
https://issues.apache.org/jira/browse/PHOENIX-5588?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16983613#comment-16983613
]
István Tóth commented on PHOENIX-5588:
--------------------------------------
Even with the fix, the SQL code that we use does not describe the situation,
while the exception message is mostly correct.
There are multiple ways that the _coprocessorService_ call can fail:
# protobuf / hbase level error
# missing coprocessor on RS
# the client is older than
MetaDataProtocol.*_MIN_NAMESPACE_MAPPED_PHOENIX_VERSION_*
# internal error within the coprocessor's getVersion method
The Exception error code that we use only correct in the 3. case, which is
quite impossible in current codebase, as it is only thrown for an ancient
client.
Still, throwing a specific exception for this case with a small chance of being
wrong is probably better than letting this bubble up and wrapping it in a
generic SQLException.
> Client-Server Incompatibility False Alarm
> -----------------------------------------
>
> Key: PHOENIX-5588
> URL: https://issues.apache.org/jira/browse/PHOENIX-5588
> Project: Phoenix
> Issue Type: Bug
> Affects Versions: 4.14.3
> Reporter: Geoffrey Jacoby
> Assignee: István Tóth
> Priority: Minor
> Labels: beginner, newbie
> Time Spent: 10m
> Remaining Estimate: 0h
>
> In ConnectionQueryServicesImpl.checkClientServerCompatibility, the method
> assumes that any exception that's not a SQLException is because the client
> and server jars are incompatible. However, an HBase level exception (such as
> NotServingRegionException or TableNotFoundException) can occur even if the
> jars are compatible.
> This results in a confusing, incorrect message in the logs that can send
> operators in the wrong direction.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)