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

Samarth Jain commented on PHOENIX-3607:
---------------------------------------

Going by number of open connections might be tricky since it's possible that a 
client could forget to close the phoenix connection resulting in the open 
connections count not getting down to 0. One way to guard against this scenario 
 would be to make the CQSI values in the cache weak references. It is not fool 
proof since it is still possible that the client code could just cache the 
phoenix connection somewhere and forget about it. Still the likelihood of 
someone forgetting to close phoenix connection is higher than the latter 
scenario.

> Change hashCode calculation for caching ConnectionQueryServicesImpls
> --------------------------------------------------------------------
>
>                 Key: PHOENIX-3607
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-3607
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 4.8.0, 4.9.0
>            Reporter: Geoffrey Jacoby
>            Assignee: Geoffrey Jacoby
>
> PhoenixDriver maintains a cache of ConnectionInfo -> 
> ConnectionQueryServicesImpl (each of which holds a single HConnection) : 
> The hash code of ConnectionInfo in part uses the hash code of its HBase User 
> object, which uses the *identity hash* of the Subject allocated at login. 
> There are concerns about the stability of this hashcode. When we log out and 
> log in after TGT refresh, will we have a new Subject?
> To be defensive, we should do a hash of the string returned by user.getName() 
> instead.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to