You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@heron.apache.org by nw...@apache.org on 2019/01/26 08:01:47 UTC

[incubator-heron] branch master updated: Another memory leak in stmgr-client (#3176)

This is an automated email from the ASF dual-hosted git repository.

nwang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-heron.git


The following commit(s) were added to refs/heads/master by this push:
     new d5e2bc3  Another memory leak in stmgr-client (#3176)
d5e2bc3 is described below

commit d5e2bc386466b3e02fbf05ef84402655b0699c19
Author: Ning Wang <nw...@twitter.com>
AuthorDate: Sat Jan 26 00:01:42 2019 -0800

    Another memory leak in stmgr-client (#3176)
    
    Another lead in stmgr-client needs a fix.
    
    This is related to the following PR:
    #3175
---
 heron/stmgr/src/cpp/manager/stmgr-client.cpp | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/heron/stmgr/src/cpp/manager/stmgr-client.cpp b/heron/stmgr/src/cpp/manager/stmgr-client.cpp
index 213c35f..68b002f 100644
--- a/heron/stmgr/src/cpp/manager/stmgr-client.cpp
+++ b/heron/stmgr/src/cpp/manager/stmgr-client.cpp
@@ -188,6 +188,7 @@ void StMgrClient::SendHelloRequest() {
 }
 
 bool StMgrClient::SendTupleStreamMessage(proto::stmgr::TupleStreamMessage& _msg) {
+  bool retval;
   proto::system::HeronTupleSet2* tuple_set = nullptr;
   tuple_set = __global_protobuf_pool_acquire__(tuple_set);
   tuple_set->ParsePartialFromString(_msg.set());
@@ -214,7 +215,7 @@ bool StMgrClient::SendTupleStreamMessage(proto::stmgr::TupleStreamMessage& _msg)
                         << "droptuples_upon_backpressure is set";
       }
     }
-    return false;
+    retval = false;
   } else {
     stmgr_client_metrics_->scope(METRIC_BYTES_TO_STMGRS)->incr_by(_msg.ByteSize());
     if (tuple_set->has_data()) {
@@ -228,8 +229,11 @@ bool StMgrClient::SendTupleStreamMessage(proto::stmgr::TupleStreamMessage& _msg)
     }
 
     SendMessage(_msg);
-    return true;
+    retval = true;
   }
+
+  __global_protobuf_pool_release__(tuple_set);
+  return retval;
 }
 
 void StMgrClient::HandleTupleStreamMessage(proto::stmgr::TupleStreamMessage* _message) {