qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (QPID-5428) heartbeats not in use when attempting to connect
Date Thu, 09 Jan 2014 22:31:51 GMT

    [ https://issues.apache.org/jira/browse/QPID-5428?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13867185#comment-13867185

ASF subversion and git services commented on QPID-5428:

Commit 1556971 from [~aconway] in branch 'qpid/trunk'
[ https://svn.apache.org/r1556971 ]

QPID-5428: Heartbeats not in use when attempting to connect with python client.

Heartbeats ignored when opening a connection, could hang indefinitely
Need to cover 3 cases (test included):
- Connect sucessful but then broker stalls.
- Connect to a stalled broker that never responds.
- Fail-over to a stalled broker that never responds

All cases are handled by the following fixes to driver.py:
- Check for heartbeats even before engine._connected since we may time out
  before receiving open-ok if the peer is stalled and never sends data.
- Set _last_in and _last_out so that we time heartbeats from the start of the
  connection if no data is ever sent or received.
- Call self.update_status in Driver.timeout to detect connection closed due to
  heartbeat timeout (rather than a readable or writeable event.)
  Make update_status a no-op if engine or transport are not yet set up.
- Don't consider reconnect complete in connect(), wait till we get the open-ok.
  See the comment on Driver._check_retry_ok()

> heartbeats not in use when attempting to connect
> ------------------------------------------------
>                 Key: QPID-5428
>                 URL: https://issues.apache.org/jira/browse/QPID-5428
>             Project: Qpid
>          Issue Type: Bug
>          Components: Python Client
>    Affects Versions: 0.26
>            Reporter: Gordon Sim
>            Assignee: Alan Conway
>             Fix For: 0.27
> The python client only uses heartbeats once the connection has been established.  It
does not use them to time out the initial connect attempt.
> E.g. modify drain to use a 5sec heartbeat, start a broker, run drain -f amq.direct and
then kill -STOP the broker - heartbeats are missed and connection times out as expected.
> But now try to reconnect to the hung broker, and the connect attempt will not timeout.

This message was sent by Atlassian JIRA

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

View raw message