ARTEMIS-1033 Fixing NPE on PageTX and reload

This commit is contained in:
Clebert Suconic 2017-03-13 08:56:14 -04:00
parent 87c7e05820
commit dce89c9c75
2 changed files with 11 additions and 1 deletions

View File

@ -966,7 +966,11 @@ public abstract class AbstractJournalStorageManager implements StorageManager {
PageTransactionInfo pageTX = pagingManager.getTransaction(pageUpdate.pageTX); PageTransactionInfo pageTX = pagingManager.getTransaction(pageUpdate.pageTX);
if (pageTX == null) {
ActiveMQServerLogger.LOGGER.journalCannotFindPageTX(pageUpdate.pageTX);
} else {
pageTX.onUpdate(pageUpdate.recods, null, null); pageTX.onUpdate(pageUpdate.recods, null, null);
}
} else { } else {
PageTransactionInfoImpl pageTransactionInfo = new PageTransactionInfoImpl(); PageTransactionInfoImpl pageTransactionInfo = new PageTransactionInfoImpl();

View File

@ -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) @Message(id = 224072, value = "Message Counter Sample Period too short: {0}", format = Message.Format.MESSAGE_FORMAT)
void invalidMessageCounterPeriod(long value); 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);
} }