ARTEMIS-1643 Compaction must check against NULL records while replaying

JournalCompactor.UpdateCompactCommand::execute is checking if updateRecord is null to avoid on replay under huge load that will be thrown AMQ142028.
This commit is contained in:
Francesco Nigro 2018-01-30 18:18:07 +01:00 committed by Howard Gao
parent 8fb3c912c0
commit 78a2e3a8f0
1 changed files with 5 additions and 1 deletions

View File

@ -486,7 +486,11 @@ public class JournalCompactor extends AbstractJournalUpdateTask implements Journ
@Override
void execute() throws Exception {
JournalRecord updateRecord = journal.getRecords().get(id);
updateRecord.addUpdateFile(usedFile, size);
if (updateRecord == null) {
ActiveMQJournalLogger.LOGGER.noRecordDuringCompactReplay(id);
} else {
updateRecord.addUpdateFile(usedFile, size);
}
}
@Override