activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gaohow...@apache.org
Subject [1/2] activemq-artemis git commit: ARTEMIS-1643 Compaction must check against NULL records while replaying
Date Wed, 31 Jan 2018 02:40:54 GMT
Repository: activemq-artemis
Updated Branches:
  refs/heads/master 8fb3c912c -> 2cbfabea2


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.


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/78a2e3a8
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/78a2e3a8
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/78a2e3a8

Branch: refs/heads/master
Commit: 78a2e3a8f06135ab090f149703e4f2d8e85ee556
Parents: 8fb3c91
Author: Francesco Nigro <nigro.fra@gmail.com>
Authored: Tue Jan 30 18:18:07 2018 +0100
Committer: Howard Gao <howard.gao@gmail.com>
Committed: Wed Jan 31 10:34:16 2018 +0800

----------------------------------------------------------------------
 .../activemq/artemis/core/journal/impl/JournalCompactor.java   | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/78a2e3a8/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/JournalCompactor.java
----------------------------------------------------------------------
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 95c35d0..aab383c 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


Mime
View raw message