ARTEMIS-2951 Fixing Large Message reference counting
This commit is contained in:
parent
4395a951b5
commit
621b845d16
|
@ -1232,7 +1232,7 @@ public abstract class AbstractJournalStorageManager extends CriticalComponentImp
|
|||
}
|
||||
|
||||
for (LargeServerMessage msg : largeMessages) {
|
||||
if (msg.toMessage().getRefCount() == 0) {
|
||||
if (msg.toMessage().getRefCount() == 0 && msg.toMessage().getDurableCount() == 0) {
|
||||
ActiveMQServerLogger.LOGGER.largeMessageWithNoRef(msg.getMessageID());
|
||||
msg.toMessage().usageDown();
|
||||
}
|
||||
|
|
|
@ -467,11 +467,6 @@ public class ServerConsumerImpl implements ServerConsumer, ReadyListener {
|
|||
}
|
||||
|
||||
if (preAcknowledge) {
|
||||
if (message.isLargeMessage()) {
|
||||
// we must hold one reference, or the file will be deleted before it could be delivered
|
||||
((LargeServerMessage) message).toMessage().usageUp();
|
||||
}
|
||||
|
||||
// With pre-ack, we ack *before* sending to the client
|
||||
ref.getQueue().acknowledge(ref, this);
|
||||
acks++;
|
||||
|
|
Loading…
Reference in New Issue