[1/2] activemq-artemis git commit: ARTEMIS-1033 Fixing NPE on PageTX and reload

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[1/2] activemq-artemis git commit: ARTEMIS-1033 Fixing NPE on PageTX and reload

jbertram
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 <[hidden email]>
Authored: Mon Mar 13 08:56:14 2017 -0400
Committer: Clebert Suconic <[hidden email]>
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);
+
+
+
 }

Reply | Threaded
Open this post in threaded view
|

[2/2] activemq-artemis git commit: This closes #1089

jbertram
This closes #1089


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

Branch: refs/heads/1.x
Commit: 6f96b057d59b40adaf2a646435e481c5b55eb829
Parents: 87c7e05 dce89c9
Author: Justin Bertram <[hidden email]>
Authored: Mon Mar 13 10:30:42 2017 -0500
Committer: Justin Bertram <[hidden email]>
Committed: Mon Mar 13 10:30:42 2017 -0500

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