]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
msg/async: clean up local buffers on dispatch 24111/head
authorGreg Farnum <gfarnum@redhat.com>
Fri, 14 Sep 2018 17:58:49 +0000 (10:58 -0700)
committerGreg Farnum <gfarnum@redhat.com>
Fri, 14 Sep 2018 17:58:49 +0000 (10:58 -0700)
The AsyncConnection keeps local (member variable) bufferlists of incoming
messages before they're placed into the Message's front/data/middle buffers.
Previously these were reset only when a new Message is being received, which
means in steady state we store a full Message for every Connection even if
it's inactive!

Instead we obviously want to drop our local references to Message state
once it's been dispatched, so that it can go away.

Fixes: http://tracker.ceph.com/issues/35987
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
src/msg/async/AsyncConnection.cc

index 933994e27da0d1249653ce0f7eb20f665a4a9f4c..03bd542d4a43a702518c60353c8f5150a836bbfc 100644 (file)
@@ -787,6 +787,12 @@ void AsyncConnection::process()
             dispatch_queue->enqueue(message, message->get_priority(), conn_id);
           }
 
+         // clean up local buffer references
+          data_buf.clear();
+          front.clear();
+          middle.clear();
+          data.clear();
+
           break;
         }