ARTEMIS-1033 Fixing NPE on PageTX and reload

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

View File

@ -960,7 +960,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();

View File

@ -1566,4 +1566,10 @@ public interface ActiveMQServerLogger extends BasicLogger {
@Message(id = 224074, value = "Failed to purge queue {0} on no consumers", format = Message.Format.MESSAGE_FORMAT)
void failedToPurgeQueue(@Cause Exception e, SimpleString bindingName);
@LogMessage(level = Logger.Level.ERROR)
@Message(id = 224075, value = "Cannot find pageTX id = {0}", format = Message.Format.MESSAGE_FORMAT)
void journalCannotFindPageTX(Long id);
}