Skip to content

Conversation

@HappenLee
Copy link
Contributor

@HappenLee HappenLee commented May 10, 2021

1 Make some MemTracker have reasonable parent MemTracker not the root tracker
2 Make each MemTracker can be eazily to trace.
3 Add show level of MemTracker to reduce the MemTracker show in the web page to have a way to control show how many tracker in web page.

Proposed changes

Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request. If it fixes a bug or resolves a feature request, be sure to link to that issue.

Types of changes

What types of changes does your code introduce to Doris?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update (if none of the other choices apply)
  • Code refactor (Modify the code structure, format the code, etc...)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • I have created an issue on (Fix [Enhance] Make MemTracker More Reasonable #5782 ) and described the bug/feature there in detail
  • Compiling and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • If these changes need document changes, I have updated the document
  • Any dependent changes have been merged

@HappenLee HappenLee changed the title [MemTracker] 1. Make some MemTracker have reasonable parent MemTracker not the root tracker [MemTracker] 1. Make some MemTracker have reasonable parent MemTracker not the root tracker 2 Make each MemTracker can be eazily to trace. 3 Add show level of MemTracker to reduce the MemTracker show in the web page to have a way to control show how many tracker in web page. May 10, 2021
@HappenLee HappenLee changed the title [MemTracker] 1. Make some MemTracker have reasonable parent MemTracker not the root tracker 2 Make each MemTracker can be eazily to trace. 3 Add show level of MemTracker to reduce the MemTracker show in the web page to have a way to control show how many tracker in web page. [MemTracker] 1. Make some MemTracker have reasonable parent MemTracker not the root tracker to eazily to trace. Add show level of MemTracker to reduce the MemTracker show in the web page to have a way to control show how many tracker in web page. May 10, 2021
@HappenLee HappenLee changed the title [MemTracker] 1. Make some MemTracker have reasonable parent MemTracker not the root tracker to eazily to trace. Add show level of MemTracker to reduce the MemTracker show in the web page to have a way to control show how many tracker in web page. [MemTracker] Make some MemTracker have reasonable parent MemTracker to eazily to trace. Add show level of MemTracker May 10, 2021
// Trace = 6
CONF_Int32(aws_log_level, "3");

// default level of MemTracker to show in webpage
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Explain whether this value is higher and more detailed or lower and more detailed.

_keys_type(keys_type),
_row_comparator(_schema),
_mem_tracker(MemTracker::CreateTracker(-1, "MemTable:" + std::to_string(tablet_id), parent_tracker)),
_mem_tracker(MemTracker::CreateTracker(-1, "MemTable", parent_tracker)),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why remove tablet id?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beacause the tracker will use the parent label id

const std::shared_ptr<MemTracker>& mem_tracker)
: _key(key), _state(kInitialized), _closed_senders(64) {
_mem_tracker = MemTracker::CreateTracker(-1, "TabletsChannel:" + key.to_string(), mem_tracker);
_mem_tracker = MemTracker::CreateTracker(-1, "TabletsChannel", mem_tracker);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why remove key?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same to up

1 Make some MemTracker have reasonable parent MemTracker not the root tracker
2 Make each MemTracker can be eazily to trace.
3 Add show level of MemTracker to reduce the MemTracker show in the web page to have a way to control show how many tracker in web page.
Copy link
Contributor

@morningman morningman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@morningman morningman added approved Indicates a PR has been approved by one committer. kind/improvement labels May 18, 2021
@morningman morningman merged commit 1a81b9e into apache:master May 19, 2021
stdpain pushed a commit to stdpain/incubator-doris that referenced this pull request Jul 8, 2021
1 Make some MemTracker have reasonable parent MemTracker not the root tracker
2 Make each MemTracker can be easily to trace.
3 Add show level of MemTracker to reduce the MemTracker show in the web page to have a way to control show how many tracker in web page.
w41ter pushed a commit to w41ter/incubator-doris that referenced this pull request Dec 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by one committer. kind/improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Enhance] Make MemTracker More Reasonable

2 participants