accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Josh Elser (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (ACCUMULO-3574) preferCachedConnections=false is not respected
Date Fri, 13 Feb 2015 03:29:12 GMT

     [ https://issues.apache.org/jira/browse/ACCUMULO-3574?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Josh Elser resolved ACCUMULO-3574.
----------------------------------
    Resolution: Fixed

> preferCachedConnections=false is not respected
> ----------------------------------------------
>
>                 Key: ACCUMULO-3574
>                 URL: https://issues.apache.org/jira/browse/ACCUMULO-3574
>             Project: Accumulo
>          Issue Type: Bug
>          Components: rpc
>    Affects Versions: 1.5.0, 1.5.1, 1.5.2, 1.6.0, 1.6.1
>            Reporter: Josh Elser
>            Assignee: Josh Elser
>             Fix For: 1.5.3, 1.7.0, 1.6.3
>
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> {code}
>   Pair<String,TTransport> getAnyTransport(List<ThriftTransportKey> servers,
boolean preferCachedConnection) throws TTransportException {
>     ....
>     if (!preferCachedConnection) {
>       synchronized (this) {
>         List<CachedConnection> cachedConnList = getCache().get(ttk);
>         if (cachedConnList != null) {
>           for (CachedConnection cachedConnection : cachedConnList) {
>             if (!cachedConnection.isReserved()) {
>               cachedConnection.setReserved(true);
>               final String serverAddr = ttk.getServer().toString();
>               log.trace("Using existing connection to {} timeout {}", serverAddr, ttk.getTimeout());
>               return new Pair<String,TTransport>(serverAddr, cachedConnection.transport);
>             }
>           }
>         }
>       }
>     }
> {code}
> It appears that ThriftTransportPool.getAnyTransport is returning a cache connection when
the caller requested that a new connection is returned instead of a cached one.



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

Mime
View raw message