[
https://issues.apache.org/jira/browse/SENTRY-1580?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15989967#comment-15989967
]
Alexander Kolbasov edited comment on SENTRY-1580 at 4/30/17 7:21 PM:
---------------------------------------------------------------------
I think the best way to do it is to use pool for Thrift transports. The reason
is that TTransport is a common object and it doesn't depend on a specific
implementation type and also it is the object that represents real TCP
connections to server that we want to test.
Pooling of actual Client object is more difficult to make generic because
Clients have different types.
For the most part clients open a new client for each request and close it once
the request is done. So to do the effective pooling we want to have pool at the
factory level.
To support pools in HA configuration we use keyed object pools, keyed by the
endpoint address. When we detect a Thrift failure on some endpoint we clear all
idle pool objects for that endpoint.
was (Author: akolb):
I think the best way to do it is to use pool for Thrift transports.
> 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)