activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbert...@apache.org
Subject [1/2] activemq-artemis git commit: ARTEMIS-1033 Fixing NPE on PageTX and reload
Date Mon, 13 Mar 2017 15:31:06 GMT
Repository: activemq-artemis
Updated Branches:
  refs/heads/1.x 87c7e0582 -> 6f96b057d


ARTEMIS-1033 Fixing NPE on PageTX and reload


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

Branch: refs/heads/1.x
Commit: dce89c9c75c03574df76a4acd8f76532b8887897
Parents: 87c7e05
Author: Clebert Suconic <clebertsuconic@apache.org>
Authored: Mon Mar 13 08:56:14 2017 -0400
Committer: Clebert Suconic <clebertsuconic@apache.org>
Committed: Mon Mar 13 09:08:30 2017 -0400

----------------------------------------------------------------------
 .../impl/journal/AbstractJournalStorageManager.java            | 6 +++++-
 .../activemq/artemis/core/server/ActiveMQServerLogger.java     | 6 ++++++
 2 files changed, 11 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dce89c9c/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/AbstractJournalStorageManager.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/AbstractJournalStorageManager.java
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/AbstractJournalStorageManager.java
index 191a89c..bf682ff 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/AbstractJournalStorageManager.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/AbstractJournalStorageManager.java
@@ -966,7 +966,11 @@ public abstract class AbstractJournalStorageManager implements StorageManager
{
 
                      PageTransactionInfo pageTX = pagingManager.getTransaction(pageUpdate.pageTX);
 
-                     pageTX.onUpdate(pageUpdate.recods, null, null);
+                     if (pageTX == null) {
+                        ActiveMQServerLogger.LOGGER.journalCannotFindPageTX(pageUpdate.pageTX);
+                     } else {
+                        pageTX.onUpdate(pageUpdate.recods, null, null);
+                     }
                   } else {
                      PageTransactionInfoImpl pageTransactionInfo = new PageTransactionInfoImpl();
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dce89c9c/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServerLogger.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServerLogger.java
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServerLogger.java
index 332e890..cf904e1 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServerLogger.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServerLogger.java
@@ -1557,4 +1557,10 @@ public interface ActiveMQServerLogger extends BasicLogger {
    @Message(id = 224072, value = "Message Counter Sample Period too short: {0}", format =
Message.Format.MESSAGE_FORMAT)
    void invalidMessageCounterPeriod(long value);
 
+   @LogMessage(level = Logger.Level.ERROR)
+   @Message(id = 224075, value = "Cannot find pageTX id = {0}", format = Message.Format.MESSAGE_FORMAT)
+   void journalCannotFindPageTX(Long id);
+
+
+
 }


Mime
View raw message