[
https://issues.apache.org/jira/browse/PHOENIX-1172?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14099808#comment-14099808
]
Samarth Jain commented on PHOENIX-1172:
---------------------------------------
I think the original intent of having the synchronization via locking was to
make sure that when connection count becomes 0 and threadA has the lock in
removeConnection, you don't want any new connection to be returned to threadB
by blocking addConnection. This way it can be made sure that no new sequences
were added to the sequenceMap. Making connectionCount an AtomicInteger won't
provide that kind of locking.
> Prevent lock contention in ConnectionQueryServicesImpl. Fix exception
> handling.
> --------------------------------------------------------------------------------
>
> Key: PHOENIX-1172
> URL: https://issues.apache.org/jira/browse/PHOENIX-1172
> Project: Phoenix
> Issue Type: Bug
> Affects Versions: 5.0.0, 3.1, 4.1
> Reporter: Samarth Jain
> Assignee: Samarth Jain
> Fix For: 5.0.0, 3.1, 4.1
>
> Attachments: PHOENIX-1172-3.0-v2.patch, PHOENIX-1172.patch
>
>
--
This message was sent by Atlassian JIRA
(v6.2#6252)