You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2020/08/12 13:29:35 UTC

[GitHub] [incubator-doris] morningman opened a new pull request #4345: [Bug][MemTracker] Cleanup the mem tracker's constructor to avoid wrong usage

morningman opened a new pull request #4345:
URL: https://github.com/apache/incubator-doris/pull/4345


   ## Proposed changes
   
   After PR: #4135, If a mem tracker has parent, it should be created by 'CreateTracker'.
   So I removed other unused constructors.
   
   And also fix the bug described in #4344 
   
   ## Types of changes
   
   - [x] Bugfix (non-breaking change which fixes an issue)
   - [x] Code refactor (Modify the code structure, format the code, etc...)
   
   ## Checklist
   
   - [x] I have create an issue on (Fix #4344 ), and have described the bug/feature there in detail
   - [x] Compiling and unit tests pass locally with my changes
   


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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] morningman commented on a change in pull request #4345: [Bug][MemTracker] Cleanup the mem tracker's constructor to avoid wrong usage

Posted by GitBox <gi...@apache.org>.
morningman commented on a change in pull request #4345:
URL: https://github.com/apache/incubator-doris/pull/4345#discussion_r469306197



##########
File path: be/src/runtime/mem_tracker.h
##########
@@ -588,14 +579,18 @@ class PoolMemTrackerRegistry {
   /// with the process tracker as its parent. There is no explicit per-pool byte_limit
   /// set at any particular impalad, so newly created trackers will always have a limit
   /// of -1.
+  /// TODO(cmy): this method is not used for now. the memtracker returned from here is
+  ///            got from a shared_ptr in `pool_to_mem_trackers_`.
+  ///            I don't know why it need to return a raw pointer.
+  ///            If this method be further used, please notice that.

Review comment:
       Okay, since this function has not been used yet, I will change the return value to shared_ptr




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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] morningman merged pull request #4345: [Bug][MemTracker] Cleanup the mem tracker's constructor to avoid wrong usage

Posted by GitBox <gi...@apache.org>.
morningman merged pull request #4345:
URL: https://github.com/apache/incubator-doris/pull/4345


   


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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] vagetablechicken commented on a change in pull request #4345: [Bug][MemTracker] Cleanup the mem tracker's constructor to avoid wrong usage

Posted by GitBox <gi...@apache.org>.
vagetablechicken commented on a change in pull request #4345:
URL: https://github.com/apache/incubator-doris/pull/4345#discussion_r469275507



##########
File path: be/src/runtime/mem_tracker.h
##########
@@ -588,14 +579,18 @@ class PoolMemTrackerRegistry {
   /// with the process tracker as its parent. There is no explicit per-pool byte_limit
   /// set at any particular impalad, so newly created trackers will always have a limit
   /// of -1.
+  /// TODO(cmy): this method is not used for now. the memtracker returned from here is
+  ///            got from a shared_ptr in `pool_to_mem_trackers_`.
+  ///            I don't know why it need to return a raw pointer.
+  ///            If this method be further used, please notice that.

Review comment:
       GetRequestPoolMemTracker is from
   https://github.com/cloudera/Impala/blob/495397101e5807c701df71ea288f4815d69c2c8a/be/src/runtime/mem-tracker.h#L497
   So we didn't make it shared last time, just Ieave it as it is. Maybe we could return shared ptr, I think there should be no problem.




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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org