Red Hat Bugzilla – Bug 462046
Automate bdb 'recover' routine on retsrating crashed broker
Last modified: 2009-02-04 10:36:27 EST
It may be possible to do this on every restart.
Kim, I've assigned this to you to investigate when you get done with 1.0.1 issues, is that ok? If not assign back to me.
The db4 BD_RECOVER flag was added to the DbEnv::open() which not only recovers the database if it is corrupted, but also upgrades the database if it is from a previous version of db4. However, to do this, the creation of the BDB databases have to be delayed until after the recover. As these were previously initialized in the constructor of the MessageStoreImpl constructor, I had to change them to pointers and create them in MessageStoreImpl::init() after the recovery is complete.
Note that there are two levels of recover, DB_RECOVER and DB_RECOVER_FATAL. At present the former is used and works against the test corrupted database; testing will reveal if there is any requirement to use the latter.
Fixed in r.2693.
Updated RHEL4 patch to match in r.2694.
To test, run the txtest soak test without the call to db_recover (currently it is one of the steps in the test script prior to restarting the broker). However, this will not give confirmation that an actual corrupted database was overcome, as the recover is silent.
It may be useful to run this test against a version prior to this fix and check that several errors are encountered in a typical soak run. Then running the same test against this new version with other conditions unchanged should yield no errors due to corruption.
RHTS test qpid_start_fails_bz458466 (db_recover is disabled now) proves that issue is fixed now. Validated on RHEL4.7/5.2 i386/x86_64 using packages:
qpidd-0.3.712127-4.el4/5 and rhm-0.3.2759-2.el4/5
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.