Return-Path: Delivered-To: apmail-incubator-qpid-commits-archive@locus.apache.org Received: (qmail 50533 invoked from network); 9 Oct 2007 18:19:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Oct 2007 18:19:12 -0000 Received: (qmail 60218 invoked by uid 500); 9 Oct 2007 18:19:00 -0000 Delivered-To: apmail-incubator-qpid-commits-archive@incubator.apache.org Received: (qmail 60197 invoked by uid 500); 9 Oct 2007 18:19:00 -0000 Mailing-List: contact qpid-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: qpid-dev@incubator.apache.org Delivered-To: mailing list qpid-commits@incubator.apache.org Received: (qmail 60188 invoked by uid 99); 9 Oct 2007 18:19:00 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Oct 2007 11:19:00 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Oct 2007 18:19:12 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 401BA1A9832; Tue, 9 Oct 2007 11:18:52 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r583253 - in /incubator/qpid/trunk/qpid/cpp/src/qpid/broker: Queue.cpp SemanticState.cpp Date: Tue, 09 Oct 2007 18:18:51 -0000 To: qpid-commits@incubator.apache.org From: rajith@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20071009181852.401BA1A9832@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: rajith Date: Tue Oct 9 11:18:51 2007 New Revision: 583253 URL: http://svn.apache.org/viewvc?rev=583253&view=rev Log: Added some debug logs to indicate credit levels and verify if a message is enqueued. I found it useful during testing Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Queue.cpp incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SemanticState.cpp Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Queue.cpp URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Queue.cpp?rev=583253&r1=583252&r2=583253&view=diff ============================================================================== --- incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Queue.cpp (original) +++ incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Queue.cpp Tue Oct 9 11:18:51 2007 @@ -80,6 +80,7 @@ }else { push(msg); } + QPID_LOG(debug, "Message Enqueued: " << msg->getApplicationHeaders()); serializer.execute(dispatchCallback); } } Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SemanticState.cpp URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SemanticState.cpp?rev=583253&r1=583252&r2=583253&view=diff ============================================================================== --- incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SemanticState.cpp (original) +++ incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SemanticState.cpp Tue Oct 9 11:18:51 2007 @@ -255,6 +255,7 @@ DeliveryId deliveryTag = parent->deliveryAdapter.deliver(msg.payload, token); + QPID_LOG(debug, "Message delivered for destination " << name); if (windowing || ackExpected) { parent->record(DeliveryRecord(msg, queue, name, token, deliveryTag, acquire, !ackExpected)); } @@ -265,9 +266,11 @@ bool SemanticState::ConsumerImpl::checkCredit(Message::shared_ptr& msg) { + QPID_LOG(debug, "Credit check for destination " << name << " byteCredit: " << byteCredit << " msgCredit: " << msgCredit); Mutex::ScopedLock l(lock); if (msgCredit == 0 || (byteCredit != 0xFFFFFFFF && byteCredit < msg->getRequiredCredit())) { return false; + QPID_LOG(debug, "Credit is empty for destination " << name); } else { if (msgCredit != 0xFFFFFFFF) { msgCredit--; @@ -475,12 +478,14 @@ void SemanticState::addByteCredit(const std::string& destination, uint32_t value) { find(destination).addByteCredit(value); + QPID_LOG(debug, "Byte Credits Requested for " << destination << ": " << value); } void SemanticState::addMessageCredit(const std::string& destination, uint32_t value) { find(destination).addMessageCredit(value); + QPID_LOG(debug, "Message Credit Requested for " << destination << ": " << value); } void SemanticState::flush(const std::string& destination)