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

Karan Mehta commented on PHOENIX-5033:
--------------------------------------

Are we encountering this error anymore? Do we need to cleanup this complete 
logic since it looks like it is not helping out anyways?

> connect() method in PhoenixDriver should catch exception properly
> -----------------------------------------------------------------
>
>                 Key: PHOENIX-5033
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-5033
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 4.13.0
>            Reporter: Xu Cang
>            Priority: Minor
>
> See this error in production:
>  
> Problem executing query. *Stack trace: 
> java.lang.IllegalMonitorStateException: attempt to unlock read lock, not 
> locked by current thread*
> at 
> java.util.concurrent.locks.ReentrantReadWriteLock$Sync.unmatchedUnlockException(ReentrantReadWriteLock.java:444)
> at 
> java.util.concurrent.locks.ReentrantReadWriteLock$Sync.tryReleaseShared(ReentrantReadWriteLock.java:428)
> at 
> java.util.concurrent.locks.AbstractQueuedSynchronizer.releaseShared(AbstractQueuedSynchronizer.java:1341)
> at 
> java.util.concurrent.locks.ReentrantReadWriteLock$ReadLock.unlock(ReentrantReadWriteLock.java:881)
> at org.apache.phoenix.jdbc.PhoenixDriver.unlock(PhoenixDriver.java:346)
> at org.apache.phoenix.jdbc.PhoenixDriver.connect(PhoenixDriver.java:223)
> at 
> phoenix.connection.ProtectedPhoenixConnectionFactory$PhoenixConnectionFactory.createPhoenixConnection(ProtectedPhoenixConnectionFactory.java:233)
> at 
> phoenix.connection.ProtectedPhoenixConnectionFactory.create(ProtectedPhoenixConnectionFactory.java:95)
> at 
> phoenix.util.PhoenixConnectionUtil.getConnection(PhoenixConnectionUtil.java:59)
> at 
> phoenix.util.PhoenixConnectionUtil.getConnection(PhoenixConnectionUtil.java:48)
>  
>  
> Questionable code:
>  
>  
>  # @Override
>  # public Connection connect(String url, Properties info) throws SQLException 
> {
>  # if (!acceptsURL(url)) \{ # return null; # }
>  # try \{ # lockInterruptibly(LockMode.READ); # checkClosed(); # return 
> createConnection(url, info); # }finally
> { # unlock(LockMode.READ); # }
>  # }
>  #  
>  #  



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

Reply via email to