-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/16411/
-----------------------------------------------------------

Review request for qpid and Gordon Sim.


Bugs: QPID-5431
    https://issues.apache.org/jira/browse/QPID-5431


Repository: qpid


Description
-------

QPID-5431: Qpid c++ client hangs / crashes during reception failover in HA 
environment (mutual recursion)

Bug in AMQP 1.0 retry code caused an infinite recursion when failing over.
The recursion was in messaging::amqp::ConnectionContext, where the following
recursive cycle could occur:
 
check()->autoconnect()->tryConnect(Url)->tryConnect(Address)->wait()->check()->...

Re-organized the code to avoid the recursion, specifically avoid calling check()
in tryConnect(Address). A disconnect detected in tryConnect results in 
continuing
the retry rather than calling autoconnect again.


Diffs
-----

  /trunk/qpid/cpp/examples/messaging/drain.cpp 1552476 
  /trunk/qpid/cpp/src/qpid/ha/BrokerReplicator.cpp 1552476 
  /trunk/qpid/cpp/src/qpid/messaging/amqp/ConnectionContext.h 1552476 
  /trunk/qpid/cpp/src/qpid/messaging/amqp/ConnectionContext.cpp 1552476 

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


Testing
-------

Bug reproducer, full make test.


Thanks,

Alan Conway

Reply via email to