mirror of https://github.com/apache/activemq.git
https://issues.apache.org/jira/browse/AMQ-6014 - topic store prefetch should take ownership like in the non persistent case - DurableSubscriberNonPersistentMessageTest regression
This commit is contained in:
parent
48fbd3116d
commit
4318eba4a3
|
@ -228,9 +228,6 @@ public class DurableTopicSubscription extends PrefetchSubscription implements Us
|
||||||
if (keepDurableSubsActive && pending.isTransient()) {
|
if (keepDurableSubsActive && pending.isTransient()) {
|
||||||
pending.addMessageFirst(node);
|
pending.addMessageFirst(node);
|
||||||
pending.rollback(node.getMessageId());
|
pending.rollback(node.getMessageId());
|
||||||
// not sure why pending.addMessageFirst does not take ownership of message reference
|
|
||||||
// by incrementing
|
|
||||||
node.incrementReferenceCount();
|
|
||||||
}
|
}
|
||||||
// createMessageDispatch increments on remove from pending for dispatch
|
// createMessageDispatch increments on remove from pending for dispatch
|
||||||
node.decrementReferenceCount();
|
node.decrementReferenceCount();
|
||||||
|
|
|
@ -69,6 +69,7 @@ class TopicStorePrefetch extends AbstractStoreCursor {
|
||||||
public synchronized void addMessageFirst(MessageReference node) throws Exception {
|
public synchronized void addMessageFirst(MessageReference node) throws Exception {
|
||||||
batchList.addMessageFirst(node);
|
batchList.addMessageFirst(node);
|
||||||
size++;
|
size++;
|
||||||
|
node.incrementReferenceCount();
|
||||||
//this.messageSize.addSize(node.getMessage().getSize());
|
//this.messageSize.addSize(node.getMessage().getSize());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue