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

Chinmay Kulkarni commented on PHOENIX-4684:
-------------------------------------------

[~jamestaylor] One way to handle this as we discussed is to clean up the 
created SYSTEM tables and also fail the client connection in case of 
incompatible client-server. As of now in some cases, we create SYSCAT and then 
fail the client connection, without dropping the wrongly created SYSCAT table, 
which is what is barring some compatible clients from connecting to the server. 

> Creation of SYSTEM tables should not depend on client-side properties
> ---------------------------------------------------------------------
>
>                 Key: PHOENIX-4684
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-4684
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: Chinmay Kulkarni
>            Priority: Major
>
> Currently, when the server receives its first connection, SYSTEM.CATALOG or 
> SYSTEM:CATALOG (and other system tables) are created depending on whether 
> namespace mapping is enabled or not on the connecting client. This can lead 
> to potential bugs and unexpected behavior. For example:
> Let's say *namespace mapping is disabled on the server*, but the first 
> connection the server gets is from a *client where namespace mapping is 
> enabled*. In this case, we will create the HBase physical table 
> SYSTEM:CATALOG and then this client fails with an _SQLException_ for 
> "Inconsistent namespace mapping properties".
> Now, when a client that has consistent namespace mapping properties with this 
> server i.e. ns-mapping disabled, tries to connect to this server, that client 
> will get the same exception from the CQSI._init_ method since SYSTEM:CATALOG 
> exists already. This client will thus never be able to get a connection to 
> the server even though it is potentially compatible with the server.
> Thus, system table creation should be purely driven by server-side properties 
> and not be dependent on the properties of the first client that connects to 
> the server.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to