Xu Cang created PHOENIX-5134:
--------------------------------
Summary: Phoenix Connection Driver #normalize does not distinguish
different url with same ZK quorum but different Properties
Key: PHOENIX-5134
URL: https://issues.apache.org/jira/browse/PHOENIX-5134
Project: Phoenix
Issue Type: Improvement
Reporter: Xu Cang
In this code
https://github.com/apache/phoenix/blob/master/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixDriver.java#L228
Phoenix now uses a cache to maintain Hconnections. The cache's key is generated
by 'normalize' method here:
https://github.com/apache/phoenix/blob/master/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixEmbeddedDriver.java#L312
The normalize method takes ZK quorum, port, rootNode, principle and keytab into
account. But not properties passed in in url.
E.g.
Request to reate one connection by this url:
jdbc:phoenix:localhost:61733;TenantId=1
Request to create another connection by this url
jdbc:phoenix:localhost:61733;TenantId=2
Based on logic we have, it will result in one same Hconnection in the
connection cache here.
This might not be something we really want.
For example, different tenant wants to have different HBase config (such as
HBase timeout settings) With the same Hconnection returned, tenant2's config
will be ignored silently.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)