qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alan Conway" <acon...@redhat.com>
Subject Re: Review Request 16577: QPID-5428: Heartbeats not in use when attempting to connect with python client.
Date Mon, 06 Jan 2014 19:59:05 GMT

This is an automatically generated e-mail. To reply, visit:

(Updated Jan. 6, 2014, 7:59 p.m.)

Review request for qpid, Gordon Sim and Rafael Schloming.


Extended test & complete fix for issues mentioned by Gordon.

Bugs: qpid-5428

Repository: qpid

Description (updated)

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

Heartbeats ignored when opening a connection, could hang indefinitely

Needed to fix these cases:
- Connection.open to a stalled broker that never responds.
- Fail-over to a stalled broker that never responds

Fix for Connection.open is straightforward (in endpoints.py): if a heartbeat is
set, we set a corresponding timeout on the Connection.attach call.

The fix for fail-over to a stalled broker is more involved (in 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()

Diffs (updated)

  /trunk/qpid/cpp/src/tests/ha_tests.py 1555989 
  /trunk/qpid/python/qpid/messaging/driver.py 1555989 
  /trunk/qpid/python/qpid/messaging/endpoints.py 1555989 

Diff: https://reviews.apache.org/r/16577/diff/



Alan Conway

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message