[OPENDJ-2978] RuntimeException while stressing the changelog Created: 29/Apr/16 Updated: 08/Nov/19 Resolved: 11/May/16
|Affects Version/s:||4.0.0, 3.5.0|
|Fix Version/s:||4.0.0, 3.5.0|
|Reporter:||Christophe Sovant||Assignee:||Nicolas Capponi|
Problem found using OpenDJ 4.0.0.
Problem introduced between rev f30855c701f (test PASS) and 0de10af1666 (test FAIL).
During the test, modrate reports errors and we have the following exceptions in the logs/errors file:
|Comment by Nicolas Capponi [ 04/May/16 ]|
I think the root cause is a wrong behavior when the size of the log file is a multiple of the size of blocks defined in BlockLogReader class (a block is by default of size 256).
This bug was already present before, but this situation never happened because the BlockLogReader#getNewestRecord() method was called only for head log file. With the change from OpenDJ-2794, the BlockLogReader#getNewestRecord() method is called systematically for all log files. It fails when reading a read-only log file that has a size which is a multiple of the size of blocks.
|Comment by Nicolas Capponi [ 09/May/16 ]|
There is actually no reason to call BlockLogReader#getNewestRecord() for read-only log files, because the newest record is always available in the file name.
So the fix involves two changes:
|Comment by Christophe Sovant [ 29/Jun/16 ]|
This problem does not appear anymore since