mirror of https://github.com/apache/activemq.git
Fixing potential NullPointerException during KahaDB index recovery.
This commit is contained in:
parent
35b7ac250b
commit
8f30866fdf
|
@ -762,6 +762,7 @@ public abstract class MessageDatabase extends ServiceSupport implements BrokerSe
|
|||
|
||||
for (Long sequenceId : matches) {
|
||||
MessageKeys keys = sd.orderIndex.remove(tx, sequenceId);
|
||||
if (keys != null) {
|
||||
sd.locationIndex.remove(tx, keys.location);
|
||||
sd.messageIdIndex.remove(tx, keys.messageId);
|
||||
metadata.producerSequenceIdTracker.rollback(keys.messageId);
|
||||
|
@ -770,6 +771,7 @@ public abstract class MessageDatabase extends ServiceSupport implements BrokerSe
|
|||
// TODO: do we need to modify the ack positions for the pub sub case?
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if( undoCounter > 0 ) {
|
||||
// The rolledback operations are basically in flight journal writes. To avoid getting
|
||||
|
|
Loading…
Reference in New Issue