[GitHub] [incubator-heron] dnrusakov commented on a change in pull request #3492: revert the stmgr clientmgr

2020-03-18 Thread GitBox
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 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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-heron] dnrusakov commented on a change in pull request #3492: revert the stmgr clientmgr

2020-03-18 Thread GitBox
dnrusakov commented on a change in pull request #3492: revert the stmgr 
clientmgr
URL: https://github.com/apache/incubator-heron/pull/3492#discussion_r394136572
 
 

 ##
 File path: heron/stmgr/src/cpp/manager/stmgr-clientmgr.cpp
 ##
 @@ -115,7 +115,7 @@ bool StMgrClientMgr::DidAnnounceBackPressure() {
   return stream_manager_->DidAnnounceBackPressure();
 }
 
-shared_ptr StMgrClientMgr::CreateClient(const sp_string& 
_other_stmgr_id,
+StMgrClient* StMgrClientMgr::CreateClient(const sp_string& _other_stmgr_id,
 
 Review comment:
   cc @nwangtw 


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-heron] dnrusakov commented on a change in pull request #3492: revert the stmgr clientmgr

2020-03-18 Thread GitBox
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 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 destrucor 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:
us...@infra.apache.org


With regards,
Apache Git Services