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

Alexander Kolbasov commented on SENTRY-1580:
--------------------------------------------

A short summary of the change.

1) The pooling implementation from SENTRY-296 is disabled and implementation 
files are removed.
2) The main pool implementation lives in 
{{sentry-core/sentry-core-common/src/main/java/org/apache/sentry/core/common/transport/SentryTransportPool.java}}
 class. It provides the logic for pooling Thrift transports. This 
implementation can transparently support both pooled and non-pooled clients 
based on the provided configuration.
3) Connection creation is handled by 
{{sentry-core/sentry-core-common/src/main/java/org/apache/sentry/core/common/transport/SentryTransportFactory.java}}
 which is a modified stateless version from the one introduced with SENTRY-1593
4) I need to keep track of the address used for each thrift connection, so the 
{{sentry-core/sentry-core-common/src/main/java/org/apache/sentry/core/common/transport/TTransportWrapper.java}}
 class is introduced for this  purpose.
5) {{SentryServiceClient}} is renamed to {{SentryConnection}} and its interface 
is now different it provides the new {{invalidate()}} method.
6) All clients are now {{AutoCloseable}} and all uses are updated to use 
try-with-resource with clients
7) All client factories are modified. In particular, tests sometimes need to 
create a new pool with a different config, so I added factoryReset() methods 
for this purpose.
8) There are some test-related changes as well.

> Provide pooled client connection model with HA
> ----------------------------------------------
>
>                 Key: SENTRY-1580
>                 URL: https://issues.apache.org/jira/browse/SENTRY-1580
>             Project: Sentry
>          Issue Type: Sub-task
>          Components: Sentry
>    Affects Versions: sentry-ha-redesign
>            Reporter: Alexander Kolbasov
>            Assignee: Alexander Kolbasov
>            Priority: Critical
>             Fix For: sentry-ha-redesign
>
>         Attachments: SENTRY-1580.001-sentry-ha-redesign.patch
>
>
> SENTRY-1477 provided a simple connection retry model which is incompatible 
> with the object pool. I think that we can combine the pool model in case of 
> multiple connections by using GenericKeyedObjectPool using server address as 
> a key. When we suspect a disconnect we can clear the whole sub-pool using 
> clear(key).



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to