Attempting to recover a store which contains a zero-length .jinf file (which can occur if the partition containing the store runs out of space) results in confusing error messages which are not only truncated somehow (this needs to be investigated as well) but are unrelated to the actual problem.
Currently, a null .jinf file results in a validation error for the journal version. This occurs because the struct for the jinf data is initialized such that the version is zero, and is set in the subsequent read of the file. If the read does not contain a valid version string, then the zero version remains and is caught during validation as an invalid version.
Insert a check for zero-length .jinf files and create an error code for this condition.
Added a new exception JERR_JINF_ZEROLENFILE which is thrown if the .jinf file is zero length.
Also improved the format of the validation messages slightly, including an error which caused the full message to be truncated.
Fixed in r.4471.
For reference, the new error is formatted as follows:
2011-08-19 10:11:42 critical Unexpected error: Queue qpid-perftest0: recoverQueues() failed: jexception 0x0c0a jinf::read() threw JERR_JINF_ZEROLENFILE: Journal info file zero length (/path/to/jrnl//JournalData.jinf) (MessageStoreImpl.cpp:820)
Fixed prior to 0.14 rebase
CLOSED/CRELEASE -> ASSIGNED -> ON_QA
The defect has to go through QA process.
Tested on RHEL5.8 and RHEL6.2 on both main architectures (i386 and
Packages used for testing:
qpidd is throwing the exception JERR_JINF_ZEROLENFILE now in case *.jinf file has zero length.