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,12 +762,14 @@ public abstract class MessageDatabase extends ServiceSupport implements BrokerSe
|
||||||
|
|
||||||
for (Long sequenceId : matches) {
|
for (Long sequenceId : matches) {
|
||||||
MessageKeys keys = sd.orderIndex.remove(tx, sequenceId);
|
MessageKeys keys = sd.orderIndex.remove(tx, sequenceId);
|
||||||
sd.locationIndex.remove(tx, keys.location);
|
if (keys != null) {
|
||||||
sd.messageIdIndex.remove(tx, keys.messageId);
|
sd.locationIndex.remove(tx, keys.location);
|
||||||
metadata.producerSequenceIdTracker.rollback(keys.messageId);
|
sd.messageIdIndex.remove(tx, keys.messageId);
|
||||||
undoCounter++;
|
metadata.producerSequenceIdTracker.rollback(keys.messageId);
|
||||||
decrementAndSubSizeToStoreStat(key, keys.location.getSize());
|
undoCounter++;
|
||||||
// TODO: do we need to modify the ack positions for the pub sub case?
|
decrementAndSubSizeToStoreStat(key, keys.location.getSize());
|
||||||
|
// TODO: do we need to modify the ack positions for the pub sub case?
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue