qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Godfrey <rob.j.godf...@gmail.com>
Subject Re: Possible for unconsumed messages to prevent GC from reclaiming memory held by prior messages?
Date Wed, 29 Oct 2014 23:52:58 GMT
Ah - well, at least that is easy to fix... I think on trunk the following
change should fix it:

Index:
broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ConsumerTarget_0_10.java
===================================================================
---
broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ConsumerTarget_0_10.java
(revision 1634888)
+++
broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ConsumerTarget_0_10.java
(working copy)
@@ -329,6 +329,10 @@


         _session.sendMessage(xfr, _postIdSettingAction);
+
+        _postIdSettingAction.setAction(null);
+        _postIdSettingAction.setXfr(null);
+
         entry.incrementDeliveryCount();
         if(_acceptMode == MessageAcceptMode.NONE && _acquireMode ==
MessageAcquireMode.PRE_ACQUIRED)
         {


The issue is the per session postIdSettingAction retaining a reference to
the last message it sent...  There's no need for it to retain that
reference, so it can be cleared immediately after sending.

I'll raise a JIRA and fix that on trunk right now.

-- Rob

On 30 October 2014 00:42, xiaodan.wang <xiaodan.wang@salesforce.com> wrote:

> Attaching the screenshot that Helen referenced:
>
> qpid_broker_heap_queueB_queueAEntries
> <
> http://qpid.2158936.n2.nabble.com/file/n7615934/qpid_broker_heap_queueB_queueAEntries.png
> >
>
> qpid_broker_heap_queueB_referenceToQueueAConsumer
> <
> http://qpid.2158936.n2.nabble.com/file/n7615934/qpid_broker_heap_queueB_referenceToQueueAConsumer.png
> >
>
>
>
> --
> View this message in context:
> http://qpid.2158936.n2.nabble.com/Possible-for-unconsumed-messages-to-prevent-GC-from-reclaiming-memory-held-by-prior-messages-tp7615368p7615934.html
> Sent from the Apache Qpid users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> For additional commands, e-mail: users-help@qpid.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message