Skip to content
This repository was archived by the owner on Mar 3, 2023. It is now read-only.

Commit f76f479

Browse files
huijunwuhuijunw
andauthored
fixstmgrcrash (#3492)
Co-authored-by: Huijun Wu <[email protected]>
1 parent 9ddbeb6 commit f76f479

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

heron/stmgr/src/cpp/manager/stmgr-clientmgr.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ bool StMgrClientMgr::DidAnnounceBackPressure() {
115115
return stream_manager_->DidAnnounceBackPressure();
116116
}
117117

118-
shared_ptr<StMgrClient> StMgrClientMgr::CreateClient(const sp_string& _other_stmgr_id,
118+
StMgrClient* StMgrClientMgr::CreateClient(const sp_string& _other_stmgr_id,
119119
const sp_string& _hostname, sp_int32 _port) {
120120
stmgr_clientmgr_metrics_->scope(METRIC_STMGR_NEW_CONNECTIONS)->incr();
121121
NetworkOptions options;
@@ -126,7 +126,7 @@ shared_ptr<StMgrClient> StMgrClientMgr::CreateClient(const sp_string& _other_stm
126126
options.set_high_watermark(high_watermark_);
127127
options.set_low_watermark(low_watermark_);
128128
options.set_socket_family(PF_INET);
129-
auto client = make_shared<StMgrClient>(eventLoop_, options, topology_name_, topology_id_,
129+
StMgrClient* client = new StMgrClient(eventLoop_, options, topology_name_, topology_id_,
130130
stmgr_id_, _other_stmgr_id, this, metrics_manager_client_,
131131
droptuples_upon_backpressure_);
132132
client->Start();

heron/stmgr/src/cpp/manager/stmgr-clientmgr.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,11 @@ class StMgrClientMgr {
7979
virtual bool AllStMgrClientsRegistered();
8080

8181
private:
82-
shared_ptr<StMgrClient> CreateClient(const sp_string& _other_stmgr_id,
82+
StMgrClient* CreateClient(const sp_string& _other_stmgr_id,
8383
const sp_string& _host_name, sp_int32 _port);
8484

8585
// map of stmgrid to its client
86-
std::unordered_map<sp_string, shared_ptr<StMgrClient>> clients_;
86+
std::unordered_map<sp_string, StMgrClient*> clients_;
8787

8888
sp_string topology_name_;
8989
sp_string topology_id_;

0 commit comments

Comments
 (0)