Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

potential leak problem of memtracker #54194

Open
XuHuaiyu opened this issue Jun 25, 2024 · 1 comment
Open

potential leak problem of memtracker #54194

XuHuaiyu opened this issue Jun 25, 2024 · 1 comment
Labels
type/enhancement The issue or PR belongs to an enhancement.

Comments

@XuHuaiyu
Copy link
Contributor

Enhancement

From #54005, we have identified a potential issue where some operator's memtracker objects might not be detached properly, leading to memory leaks. When these operators act as the inner child of an apply operator, they are repeatedly opened and closed, causing the leaked memTracker and Action objects to remain referenced and unreclaimed. This results in uncontrolled memory accumulation.

We need to construct a set of tests to observe different operators when they act as the inner child of an apply operator. By capturing heap profiles, we aim to determine if there are any memtracker or action leaks.

@XuHuaiyu XuHuaiyu added the type/enhancement The issue or PR belongs to an enhancement. label Jun 25, 2024
@XuHuaiyu
Copy link
Contributor Author

It is important to note that we cannot detach the operator's memTracker in the operator.Close method, as this would prevent explain analyze from retrieving the memory consumption value associated with the operator. Instead, we should perform the detachment in the operator.Open method by calling operator.memTracker.Reset() when the operator.memTracker is not null.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
Development

No branches or pull requests

1 participant