From 7fb37f6ade205c9839a647d79bc047ce8ac521dc Mon Sep 17 00:00:00 2001 From: Greg Farnum Date: Fri, 14 Sep 2018 10:58:49 -0700 Subject: [PATCH] msg/async: clean up local buffers on dispatch 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 (cherry picked from commit 47ed036753223c44c7bf66c64d4a4adfe7267c0a) --- src/msg/async/AsyncConnection.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/msg/async/AsyncConnection.cc b/src/msg/async/AsyncConnection.cc index c14060c1bd3..a031da1e6e8 100644 --- a/src/msg/async/AsyncConnection.cc +++ b/src/msg/async/AsyncConnection.cc @@ -783,6 +783,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; } -- 2.47.3