dnrusakov commented on a change in pull request #3492: revert the stmgr
clientmgr
URL: https://github.com/apache/incubator-heron/pull/3492#discussion_r394136265
##########
File path: 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,
Review comment:
@huijunw
What you have basically done is allocating some memory but never cleaning it
up.
It may lead to memory leaks.
You don't observe that problem any more because now you never call a
destructor for `StMgrClientMgr` (previously `shared_ptr` called the destructor
of `StMgrClientMgr` as soon as the object is out of scope or the destructor of
enclosing object is called).
To fix the original issue you need to run stream manager under Valgrind,
then reproduce the crash locally, then take a look at the Valgrind log to see
what is the precise stack trace.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services