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

huijun 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 f76f479  fixstmgrcrash (#3492)
f76f479 is described below

commit f76f47932f0c4f3c435fd1d9af4d189c1dd71577
Author: bed debug <[email protected]>
AuthorDate: Wed Mar 25 15:49:53 2020 -0700

    fixstmgrcrash (#3492)
    
    Co-authored-by: Huijun Wu <[email protected]>
---
 heron/stmgr/src/cpp/manager/stmgr-clientmgr.cpp | 4 ++--
 heron/stmgr/src/cpp/manager/stmgr-clientmgr.h   | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/heron/stmgr/src/cpp/manager/stmgr-clientmgr.cpp 
b/heron/stmgr/src/cpp/manager/stmgr-clientmgr.cpp
index f2cb4ea..787a0d6 100644
--- a/heron/stmgr/src/cpp/manager/stmgr-clientmgr.cpp
+++ b/heron/stmgr/src/cpp/manager/stmgr-clientmgr.cpp
@@ -115,7 +115,7 @@ bool StMgrClientMgr::DidAnnounceBackPressure() {
   return stream_manager_->DidAnnounceBackPressure();
 }
 
-shared_ptr<StMgrClient> StMgrClientMgr::CreateClient(const sp_string& 
_other_stmgr_id,
+StMgrClient* StMgrClientMgr::CreateClient(const sp_string& _other_stmgr_id,
                                           const sp_string& _hostname, sp_int32 
_port) {
   stmgr_clientmgr_metrics_->scope(METRIC_STMGR_NEW_CONNECTIONS)->incr();
   NetworkOptions options;
@@ -126,7 +126,7 @@ shared_ptr<StMgrClient> StMgrClientMgr::CreateClient(const 
sp_string& _other_stm
   options.set_high_watermark(high_watermark_);
   options.set_low_watermark(low_watermark_);
   options.set_socket_family(PF_INET);
-  auto client = make_shared<StMgrClient>(eventLoop_, options, topology_name_, 
topology_id_,
+  StMgrClient* client = new StMgrClient(eventLoop_, options, topology_name_, 
topology_id_,
                                         stmgr_id_, _other_stmgr_id, this, 
metrics_manager_client_,
                                         droptuples_upon_backpressure_);
   client->Start();
diff --git a/heron/stmgr/src/cpp/manager/stmgr-clientmgr.h 
b/heron/stmgr/src/cpp/manager/stmgr-clientmgr.h
index 3a5a75f..3e3fdf4 100644
--- a/heron/stmgr/src/cpp/manager/stmgr-clientmgr.h
+++ b/heron/stmgr/src/cpp/manager/stmgr-clientmgr.h
@@ -79,11 +79,11 @@ class StMgrClientMgr {
   virtual bool AllStMgrClientsRegistered();
 
  private:
-  shared_ptr<StMgrClient> CreateClient(const sp_string& _other_stmgr_id,
+  StMgrClient* CreateClient(const sp_string& _other_stmgr_id,
                             const sp_string& _host_name, sp_int32 _port);
 
   // map of stmgrid to its client
-  std::unordered_map<sp_string, shared_ptr<StMgrClient>> clients_;
+  std::unordered_map<sp_string, StMgrClient*> clients_;
 
   sp_string topology_name_;
   sp_string topology_id_;

Reply via email to