Author: gsim
Date: Mon Mar  3 11:19:00 2008
New Revision: 633241

URL: http://svn.apache.org/viewvc?rev=633241&view=rev
Log:
Updated tracking of outgoing command id and send command-point control on 
session attachment.


Modified:
    incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionHandler.cpp
    incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionState.cpp
    incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionState.h
    incubator/qpid/trunk/qpid/cpp/src/tests/.valgrind.supp

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionHandler.cpp
URL: 
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionHandler.cpp?rev=633241&r1=633240&r2=633241&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionHandler.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionHandler.cpp Mon Mar  3 
11:19:00 2008
@@ -126,6 +126,7 @@
         connection.broker.getSessionManager().open(*this, 0));
     session.reset(state.release());
     peerSession.attached(name);
+    peerSession.commandPoint(session->nextOut, 0);
 }
 
 void SessionHandler::attached(const std::string& /*name*/)
@@ -171,7 +172,7 @@
 {
     if (offset) throw NotImplementedException("Non-zero byte offset not yet 
supported for command-point");
     
-    session->next = id;
+    session->nextIn = id;
 }
 
 void SessionHandler::expected(const framing::SequenceSet& commands, const 
framing::Array& fragments)
@@ -203,7 +204,7 @@
 void SessionHandler::flush(bool expected, bool confirmed, bool completed)
 {
     if (expected) {
-        peerSession.expected(SequenceSet(session->next), Array());
+        peerSession.expected(SequenceSet(session->nextIn), Array());
     }
     if (confirmed) {
         peerSession.confirmed(session->completed, Array());

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionState.cpp
URL: 
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionState.cpp?rev=633241&r1=633240&r2=633241&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionState.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionState.cpp Mon Mar  3 
11:19:00 2008
@@ -170,7 +170,7 @@
 
 void SessionState::handleCommand(framing::AMQMethodBody* method)
 {
-    SequenceNumber id = next++;
+    SequenceNumber id = nextIn++;
     Invoker::Result invocation = invoke(adapter, *method);
     completed.add(id);                                    
     
@@ -189,7 +189,7 @@
 {
     intrusive_ptr<Message> msg(msgBuilder.getMessage());
     if (!msg) {//start of frameset will be indicated by frame flags
-        SequenceNumber id = next++;
+        SequenceNumber id = nextIn++;
         msgBuilder.start(id);
         msg = msgBuilder.getMessage();
     }
@@ -225,8 +225,8 @@
 DeliveryId SessionState::deliver(QueuedMessage& msg, DeliveryToken::shared_ptr 
token)
 {
     uint32_t maxFrameSize = getConnection().getFrameMax();
-    MessageDelivery::deliver(msg, getProxy().getHandler(), ++outgoing.hwm, 
token, maxFrameSize);
-    return outgoing.hwm;
+    MessageDelivery::deliver(msg, getProxy().getHandler(), nextOut, token, 
maxFrameSize);
+    return nextOut++;
 }
 
 void SessionState::sendCompletion()

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionState.h
URL: 
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionState.h?rev=633241&r1=633240&r2=633241&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionState.h (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionState.h Mon Mar  3 
11:19:00 2008
@@ -116,7 +116,8 @@
 
     framing::SequenceSet completed;
     framing::SequenceSet knownCompleted;
-    framing::SequenceNumber next;
+    framing::SequenceNumber nextIn;
+    framing::SequenceNumber nextOut;
 
   private:
     typedef boost::function<void(DeliveryId, DeliveryId)> RangedOperation;    
@@ -134,7 +135,6 @@
     BrokerAdapter adapter;
     MessageBuilder msgBuilder;
 
-    framing::Window outgoing;
     RangedOperation ackOp;
 
     management::Session::shared_ptr mgmtObject;

Modified: incubator/qpid/trunk/qpid/cpp/src/tests/.valgrind.supp
URL: 
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/tests/.valgrind.supp?rev=633241&r1=633240&r2=633241&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/tests/.valgrind.supp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/tests/.valgrind.supp Mon Mar  3 11:19:00 
2008
@@ -30,3 +30,64 @@
    fun:epoll_ctl
 }
 
+{
+   Reported only on Fedora 5
+   Memcheck:Leak
+   fun:calloc
+   fun:_dl_allocate_tls
+   fun:pthread_create@@GLIBC_2.1
+   fun:[EMAIL PROTECTED]
+   fun:_ZN4qpid3sys6ThreadC1EPNS0_8RunnableE
+   fun:_ZN4qpid6client9Connector4initEv
+   fun:_ZN4qpid6client14ConnectionImpl4openERKSsiS3_S3_S3_
+}
+{
+   Reported against Fedora 5     
+   Memcheck:Leak
+   fun:calloc
+   fun:_dl_allocate_tls
+   fun:pthread_create@@GLIBC_2.1
+   fun:[EMAIL PROTECTED]
+   fun:_ZN4qpid6client9Connector4initEv
+}
+
+{
+   Reported against perf_test on Fedora 5
+   Memcheck:Leak
+   fun:calloc
+   fun:_dl_allocate_tls
+   fun:pthread_create@@GLIBC_2.1
+   fun:_ZN4qpid3sys6ThreadC1ERNS0_8RunnableE
+   fun:main
+}
+{
+   Reported against Fedora 5     
+   Memcheck:Leak
+   fun:calloc
+   fun:_dl_allocate_tls
+   fun:pthread_create@@GLIBC_2.1
+   fun:[EMAIL PROTECTED]
+   fun:_ZN4qpid3sys6ThreadC1EPNS0_8RunnableE
+   fun:_ZN4qpid6broker5Timer5startEv
+   fun:_ZN4qpid6broker5TimerC1Ev
+}
+{
+   Reported against Fedora 5     
+   Memcheck:Leak
+   fun:calloc
+   fun:_dl_allocate_tls
+   fun:pthread_create@@GLIBC_2.1
+   fun:[EMAIL PROTECTED]
+   fun:_ZN4qpid6broker5Timer5startEv
+   fun:_ZN4qpid6broker5TimerC1Ev
+}
+{
+   Fedora 5 issue again     
+   Memcheck:Leak
+   fun:calloc
+   fun:_dl_allocate_tls
+   fun:pthread_create@@GLIBC_2.1
+   fun:[EMAIL PROTECTED]
+   fun:_ZN4qpid6client9Connector4initEv
+   fun:_ZN4qpid6client14ConnectionImpl4openERKSsiS3_S3_S3_
+}


Reply via email to