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

Kenneth Howe reassigned GEODE-5333:
-----------------------------------

             Assignee: Kenneth Howe
    Affects Version/s: 1.7.0
               Labels: regression  (was: )
          Component/s: client/server

> Failed connection objects may be retained indefinitely - can lead to 
> OutOfMemoryError 
> --------------------------------------------------------------------------------------
>
>                 Key: GEODE-5333
>                 URL: https://issues.apache.org/jira/browse/GEODE-5333
>             Project: Geode
>          Issue Type: Bug
>          Components: client/server
>    Affects Versions: 1.7.0
>            Reporter: Kenneth Howe
>            Assignee: Kenneth Howe
>            Priority: Major
>              Labels: regression
>
> After refactoring of {{ConnectionFactoryImpl}} and {{ConnectionConnector}} 
> (GEODE-5261), connections that fail during connect due to an execption (for 
> example, {{GemfireSecurityException}}) are not destroyed 
> ({{connection.destroy()}}).
> Prior to refactoring, the {{connect()}} was performed in a try/catch/finally 
> in {{ConnectionFactoryImpl.createClientToServerConnection()}}
> {code:java}
>   public Connection createClientToServerConnection(ServerLocation location, 
> boolean forQueue)
>       throws GemFireSecurityException {
>     ConnectionImpl connection = new ConnectionImpl(this.ds, 
> this.cancelCriterion);
> ...
>     try {
>       ClientSideHandshake connHandShake = new 
> ClientSideHandshakeImpl(handshake);
>       connection.connect(endpointManager, location, connHandShake, 
> socketBufferSize,
>           handshakeTimeout, readTimeout, getCommMode(forQueue), 
> this.gatewaySender,
>           this.socketCreator);
> ...
>     } catch (... e) {
>       throw e;
> ...
>     } finally {
>       if (!initialized) {
>         connection.destroy();
>         failureTracker.addFailure();
>         connection = null;
>       }
>     }
> {code}
> After the refactoring, the connect is performed in 
> {{ConnectionConnector.connectClientToServer}}. If {{connect()}} throws an 
> exception back to the {{ConnectionFactoryImpl}}, the connection object in 
> {{ConnectionConnector}} isn't destroyed.



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

Reply via email to