qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robbie Gemmell (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (QPID-144) Potential deadlocks during failover
Date Sat, 13 Aug 2011 17:16:27 GMT

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

Robbie Gemmell updated QPID-144:
--------------------------------

    Component/s:     (was: Dot Net Client)

Removing .net client from components, as this related to the old 0-8 / 0-10 .Net clients which
were removed from the repository months ago, and not the current .Net bindings for the C++
messaging API.

> Potential deadlocks during failover
> -----------------------------------
>
>                 Key: QPID-144
>                 URL: https://issues.apache.org/jira/browse/QPID-144
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Client
>            Reporter: Steven Shaw
>            Assignee: Rob Godfrey
>
> There's a certain need for "failover safety" in the implemenation of public client api
methods. Any method that blocks for a response frame should be wrapped in a FailoverSupport.
FailoverSupport automates the retrying after catching a FailoverException (a RuntimeException).
> Methods that block waiting for a response frame are now easier to identify because they
all call AMQProtocolHandler.syncWrite() (SyncWrite in the .NET client)
> Currently the only methods employing FailoverSupport are AMQConnection.createSession,
AMQSession.createConsumerImpl and createProducerImpl.
> AMQConnection.createSession has 3 calls to syncWrite so certainly needs to be wrapped
in FailoverSupport. No problem there.
> AMQSession.createConsumerImpl/createProducerImpl neither call syncWrite. Unless there
is some other important way in which they block, they don't really need to be wrapped in the
FailoverSupport. It does no harm however.
> The following methods use syncWrite() but are not wrapped in a FailoverSupport:
>   AMQSession's commit(), rollback(), close()
>   AMQConnection.close() via AMQProtocolHandler.closeConnection()
>   BasicMessageConsumer.close()
> These need to be protected/wrapped in a FailoverSupport. Note that commit() and rollback()
are not currently protected by a lock on failoverMutex either.
> Perhaps StateManager.attainState is the only other method that blocks for "a response
frame". In this case a series of response frames that result in the state changing. The only
use of attainState is in AMQConnection.makeBrokerConnection. It would appear to need to be
wrapped in a FailoverSupport as otherwise the FailoverException will escape. Since this is
failing-over during connection some care may be required. Note that the makeBrokerConnection
is used at 3 different sites.
> In addition sendAcknowledgement appear to need to lock the failoverMutex.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


Mime
View raw message