From 78a2e3a8f06135ab090f149703e4f2d8e85ee556 Mon Sep 17 00:00:00 2001 From: Francesco Nigro Date: Tue, 30 Jan 2018 18:18:07 +0100 Subject: [PATCH] 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. --- .../artemis/core/journal/impl/JournalCompactor.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/JournalCompactor.java b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/JournalCompactor.java index 95c35d0b2e..aab383c1ed 100644 --- a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/JournalCompactor.java +++ b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/JournalCompactor.java @@ -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