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

Keith Wall closed QPID-6664.
----------------------------

> Connection#close may hang awaiting failover to exhaust retries
> --------------------------------------------------------------
>
>                 Key: QPID-6664
>                 URL: https://issues.apache.org/jira/browse/QPID-6664
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Client
>    Affects Versions: 0.8, 0.10, 0.12, 0.14, 0.16, 0.18, 0.20, 0.22, 0.24, 
> 0.26, 0.28, 0.30, 0.32
>            Reporter: Alex Rudyy
>            Assignee: Alex Rudyy
>             Fix For: qpid-java-6.0
>
>
>  A client's call to Connection#close may hang awaiting failover to exhaust 
> its retry count.  This occurs because the failover thread has acquired the 
> failover mutex, and closing sessions requires the same mutex. 
> If the connection has no Sessions, instead the Connection#close will 
> complete, but the failover thread will continue to spin in the background.  
> The following could be done to fix the issue:
> # AMQConnection#attemptReconnection while expression needs to include 
> !isClosed().
> # AMQConnection#close() needs to acquire the failover mutex *after* its call 
> to doClose(sessions, timeout) to ensure that, in the case of a connection 
> without sessions, the thread performing failover will have finished its work 
> (i.e. for 0-8 the FailoverThread will be ending) before #close returns to the 
> caller.
> # #AMQConnection#exceptionReceived needs to lose responsibility for mutating 
> closed/closing.  This responsibility needs to be pushed to its callers.  0-10 
> already does this, this change will make 0-8 the same.  This will mean that 
> _closed means the user has closed the connections, or the Broker has closed 
> the connection and failover has given up.
> # Remove Closable#resetClosedFlag



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

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org

Reply via email to