Skip to content

[enhancement](memtracker) Fix MemTrackerLimiter lifecycle hidden risks#11376

Merged
yiguolei merged 1 commit intoapache:masterfrom
xinyiZzz:mem_tracker_factor_v2_fix5
Aug 1, 2022
Merged

[enhancement](memtracker) Fix MemTrackerLimiter lifecycle hidden risks#11376
yiguolei merged 1 commit intoapache:masterfrom
xinyiZzz:mem_tracker_factor_v2_fix5

Conversation

@xinyiZzz
Copy link
Contributor

@xinyiZzz xinyiZzz commented Jul 31, 2022

Proposed changes

Issue Number: close #11375

Problem Summary:

  1. Change MemTrackerLimit to shared_ptr to avoid possible life cycle risks. This is no longer a performance problem, because the number of switching MemTrackerLimit in thread local is greatly reduced.

  2. Fix MemTrackerTaskPool hidden core dump

  3. Print stack trace when Memory exceeds limit

Checklist(Required)

  1. Does it affect the original behavior:
    • Yes
    • No
    • I don't know
  2. Has unit tests been added:
    • Yes
    • No
    • No Need
  3. Has document been added or modified:
    • Yes
    • No
    • No Need
  4. Does it need to update dependencies:
    • Yes
    • No
  5. Are there any changes that cannot be rolled back:
    • Yes
    • No

Further comments

If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...

@xinyiZzz xinyiZzz changed the title [enhancement](memtracker) [enhancement](memtracker) Fix MemTrackerLimiter lifecycle hidden risks Jul 31, 2022
Copy link
Contributor

@yiguolei yiguolei left a comment

Choose a reason for hiding this comment

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

LGTM

@yiguolei yiguolei merged commit 73d8f59 into apache:master Aug 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Enhancement] MemTrackerLimiter lifecycle is at risk

2 participants