From users-return-16839-apmail-activemq-users-archive=activemq.apache.org@activemq.apache.org Tue Nov 11 10:44:36 2008 Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 8279 invoked from network); 11 Nov 2008 10:44:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 11 Nov 2008 10:44:36 -0000 Received: (qmail 15536 invoked by uid 500); 11 Nov 2008 10:44:42 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 15512 invoked by uid 500); 11 Nov 2008 10:44:42 -0000 Mailing-List: contact users-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@activemq.apache.org Delivered-To: mailing list users@activemq.apache.org Received: (qmail 15499 invoked by uid 99); 11 Nov 2008 10:44:42 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Nov 2008 02:44:42 -0800 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of gary.tully@gmail.com designates 209.85.128.186 as permitted sender) Received: from [209.85.128.186] (HELO fk-out-0910.google.com) (209.85.128.186) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Nov 2008 10:43:21 +0000 Received: by fk-out-0910.google.com with SMTP id z22so3846757fkz.6 for ; Tue, 11 Nov 2008 02:44:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=aMKfo/lRtGY5/CZe752JVgu0AmDdEsryJArUVMFanN8=; b=Te6LtMlHhjYgComiOV5AMiBYUrbPS5kpEkMpgXTXltnbhlweTFZ7Tf0g83oDz+HeTn HPlvUR07eIT0XCs0pd1bgJgqKbwtyCPwldBUxo4fUsbPZ4+cGFfzntPRJLmNUBfdLbFh zM1HOFQWJDBok/00uS2ALCGOrZGA0zQQNYB7o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=Hxcu8qlC93jMMkORLF1UF1g/EH5FAZ33mPSKlEI9WvExnQebTZeM6ppwI2NbZ88k5W eoyyYziVXXwcbcth9GvkKu+HhBCHYZ/Xm2r6JMUVZJks3lbJaO7dnHkHjjEYGDJdF3/B SgoQkzGpfDyvWL4i9qY9B2xLwK9qaDi1TBOXY= Received: by 10.181.61.7 with SMTP id o7mr2454549bkk.85.1226400243130; Tue, 11 Nov 2008 02:44:03 -0800 (PST) Received: by 10.181.47.15 with HTTP; Tue, 11 Nov 2008 02:44:03 -0800 (PST) Message-ID: <3a73c17c0811110244x2317573frde9103ddfcc270ac@mail.gmail.com> Date: Tue, 11 Nov 2008 10:44:03 +0000 From: "Gary Tully" To: users@activemq.apache.org Subject: Re: memoryUsage configuration In-Reply-To: <20435735.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20416088.post@talk.nabble.com> <20435735.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org Hi Lurga, this seems to be a valid anomaly. Please check out the contributing[1] details to see the best way to make your changes permanent. [1] http://activemq.apache.org/contributing.html 2008/11/11 lurga : > > Queue invokes memoryUsage.isFull() method to decide when to block producer > sending message, and FilePendingCursor invokes hasSpace() method (uses > systemUsage of the Queue) to decide when to flush messages to disk. I made a > patch to avoid diverse results from these two different ways of judgement. > Now it seems to work correct. > > Index: > activemq-core/src/main/java/org/apache/activemq/broker/region/Queue.java > =================================================================== > --- activemq-core/src/main/java/org/apache/activemq/broker/region/Queue.java > (revision 712969) > +++ activemq-core/src/main/java/org/apache/activemq/broker/region/Queue.java > (working copy) > @@ -141,6 +141,12 @@ > memoryUsage.setParent(systemUsage.getMemoryUsage()); > } > > + long memoryUsageHighWaterMark = > + Math.min(memoryUsage.getLimit(), > systemUsage.getMemoryUsage().getLimit()) > + * messages.getMemoryUsageHighWaterMark() > + / systemUsage.getMemoryUsage().getLimit(); > + messages.setMemoryUsageHighWaterMark((int) > memoryUsageHighWaterMark); > + > if (isOptimizedDispatch()) { > this.taskRunner = taskFactory.createTaskRunner(this, > "TempQueue: " + destination.getPhysicalName()); > }else { > -- > View this message in context: http://www.nabble.com/memoryUsage-configuration-tp20416088p20435735.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. > >