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

Review request for qpid, Andrew Stitcher, Gordon Sim, and Justin Ross.


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


Repository: qpid


Description
-------

The broker fails to recover after a restart while using the linearstore and the 
following:
1. A non-durable exchange;
2. A topic that uses the non-durable exchange;
3. The amqp.so AMQP library.

Attempting to start the broker results in the error message:
 [Broker] critical Unexpected error: not-found: Exchange not found: test.ex 
(/builddir/build/BUILD/qpid-0.22/cpp/src/qpid/broker/ExchangeRegistry.cpp:144)

This failure occurs when the amqp module recovers the persistent topic, but 
does not handle the exception that is thrown when the exchange upon which it 
depends does not exist. This is a serious problem because it is a condition 
which can be relatively easliy created undetected, and which prevents the 
broker from starting. This condition can only be resolved by truncating the 
store or erasing the store directory.

The simplest solution is to handle the error condition. This is done by 
catching the error within qpid::broker::ObjectFactory::recoverObject() 
function, and simply making sure that the boolean false value is returned. This 
in turn causes an error message to be printed to the log:

[Broker] warning Failed to recover object test.topic of type topic

but the broker continues to recover and starts normally. Adding a more 
verbose/noisy/specific error message would not be too difficlut either, but 
would probably need to be handled lower down in TopicRegistry::recoverObject(), 
but this would contaminate this part of the code with ugly string handling 
and/or logging includes and statements.

I am unfamiliar with this part of the broker code, so some additional review 
would be appreciated.


Diffs
-----

  /trunk/qpid/cpp/src/qpid/broker/ObjectFactory.cpp 1614097 

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


Testing
-------

Recovery of the scenario described in QPID-5948 results in a full broker 
recovery, but with the error message:

[Broker] warning Failed to recover object test.topic of type topic


Thanks,

Kim van der Riet

Reply via email to