-
Notifications
You must be signed in to change notification settings - Fork 592
revert the stmgr clientmgr #3492
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @huijunw There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. cc @nwangtw There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Thanks. Yeah I think you are right. Shared ptr is reference based hence this crash is quite strange. The only possible way is a bad cast somewhere that cause the ref count messed up. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. when a new physical plan is issued from tmaster, the stmgr-client-manager swaps the old stmgr out from array and explicitly calls quit() destructor. |
||
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(); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm. This is strange because shared_ptr<> should be safer and I can't tell what can be wrong in the original code. @dnrusakov should have better idea.