This is an automated email from the ASF dual-hosted git repository. huijun pushed a commit to branch huijunw/20200317 in repository https://gitbox.apache.org/repos/asf/incubator-heron.git
commit 1e6695f280facffaa20f992dc0b3484dff01436f Author: Huijun Wu <[email protected]> AuthorDate: Tue Mar 17 18:47:20 2020 -0700 fixstmgrcrash --- 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_;
