*: enhance mem tracker exclude rss_file & check limit for columnar#10867
*: enhance mem tracker exclude rss_file & check limit for columnar#10867yongman wants to merge 9 commits into
Conversation
Signed-off-by: yongman <yming0221@gmail.com> (cherry picked from commit d54c26a4afa31b362c538394190f29299b94970c)
Signed-off-by: yongman <yming0221@gmail.com> (cherry picked from commit ec4bf8011fa46f8c9750594a01f7303f7bd96689)
Signed-off-by: yongman <yming0221@gmail.com> (cherry picked from commit d946399942e70bf0d8aa1b7567ad5e498108f2e2)
Signed-off-by: yongman <yming0221@gmail.com> (cherry picked from commit 66c3e5a377acb05cbb9cd819e06b0fc94d8ada9a)
|
Skipping CI for Draft Pull Request. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe PR separates file-backed RSS from anonymous RSS, records rss_file via process metrics, computes effective RSS = max(real_rss - real_rss_file, 0), centralizes RSS-limit checks, integrates the check into allocation and storage read paths, and advances jemalloc epoch before metrics collection. ChangesRSS-aware memory tracking and limit enforcement
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@yongman I've received your pull request and will start the review. I'll conduct a thorough review covering code quality, potential issues, and implementation details. ⏳ This process typically takes 10-30 minutes depending on the complexity of the changes. ℹ️ Learn more details on Pantheon AI. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@dbms/src/Common/MemoryTracker.cpp`:
- Line 190: The call to checkRssLimitImpl(...) (e.g., checkRssLimitImpl(/*
require_tracked_growth */ true, will_be, size)) can throw after tracked bytes
were already incremented, so you must roll back the tracked increase on
exception; wrap the checkRssLimitImpl call in a try/catch and on catch subtract
the previously added amount (e.g., call the corresponding decrease/undo method
or subtract from tracked_bytes by size) before rethrowing; apply the same
rollback pattern to the other allocation paths referenced (the block around
lines 235–290) so any early abort always undoes the tracked increment.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: fd99563b-e41a-4731-b09c-3a308a1afd56
📒 Files selected for processing (6)
dbms/src/Common/BackgroundTask.cppdbms/src/Common/MemoryTracker.cppdbms/src/Common/MemoryTracker.hdbms/src/Interpreters/AsynchronousMetrics.cppdbms/src/Interpreters/Settings.hdbms/src/Storages/StorageDisaggregatedColumnar.cpp
Signed-off-by: yongman <yming0221@gmail.com>
|
@yongman: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
What problem does this PR solve?
Issue Number: ref #10844
Problem Summary:
What is changed and how it works?
rss_filepart can be auto freed by OS.Check List
Tests
Side effects
Documentation
Release note
Summary by CodeRabbit
Bug Fixes
Chores