Skip to content

Conversation

@mergify
Copy link
Contributor

@mergify mergify bot commented Nov 12, 2025

Why I'm doing:

See this PR

What I'm doing:

Adding a new class shared_mem_tracker_manager. This class manages shared_mem_tracker and will return the same mem tracker for the same mem_pool.

What type of PR is this:

  • BugFix
  • Feature
  • Enhancement
  • Refactor
  • UT
  • Doc
  • Tool

Does this PR entail a change in behavior?

  • Yes, this PR will result in a change in behavior.
  • No, this PR will not result in a change in behavior.

If yes, please specify the type of change:

  • Interface/UI changes: syntax, type conversion, expression evaluation, display information
  • Parameter changes: default values, similar parameters but with different default values
  • Policy changes: use new policy to replace old one, functionality automatically enabled
  • Feature removed
  • Miscellaneous: upgrade & downgrade compatibility, etc.

Checklist:

  • I have added test cases for my bug fix or my new feature
  • This pr needs user documentation (for new or modified features or behaviors)
    • I have added documentation for my new feature or new function
  • This is a backport pr

Bugfix cherry-pick branch check:

  • I have checked the version labels which the pr will be auto-backported to the target branch
    • 4.0
    • 3.5
    • 3.4
    • 3.3

Note

Introduce a shared MemTracker per mem_pool and wire it into WorkGroup creation/initialization, adding a new tracker type, Thrift field, and tests.

  • WorkGroup / Manager:
    • Add mem_pool to WorkGroup (ctor, accessors) and accept parent mem tracker in init to support shared pools.
    • Create MemTrackerManager to return a shared parent MemTracker per mem_pool; integrate in WorkGroupManager::create_workgroup_unlocked.
    • Provide default DEFAULT_MEM_POOL and handle default vs custom pools.
  • Runtime / MemTracker:
    • Add MemTrackerType::RESOURCE_GROUP_SHARED_MEMORY_POOL and corresponding error message.
    • Expose GlobalEnv::query_pool_mem_tracker_shared().
  • Thrift:
    • Extend TWorkGroup with optional mem_pool.
  • Build & Tests:
    • Register new sources in CMake.
    • Add UTs for shared tracker behavior and manager integration; adjust existing tests to new WorkGroup ctor/init API.

Written by Cursor Bugbot for commit 9f41d21. This will update automatically on new commits. Configure here.


This is an automatic backport of pull request #64112 done by [Mergify](https://mergify.com).

…esource groups (#64112)

(cherry picked from commit 47e49db)

# Conflicts:
#	be/src/exec/workgroup/work_group.cpp
#	be/src/runtime/mem_tracker.cpp
#	be/src/runtime/mem_tracker.h
#	be/test/CMakeLists.txt
@mergify mergify bot added the conflicts label Nov 12, 2025
@mergify
Copy link
Contributor Author

mergify bot commented Nov 12, 2025

Cherry-pick of 47e49db has failed:

On branch mergify/bp/branch-3.4/pr-64112
Your branch is up to date with 'origin/branch-3.4'.

You are currently cherry-picking commit 47e49db400.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   be/src/exec/CMakeLists.txt
	new file:   be/src/exec/workgroup/mem_tracker_manager.cpp
	new file:   be/src/exec/workgroup/mem_tracker_manager.h
	modified:   be/src/exec/workgroup/work_group.h
	modified:   be/src/runtime/exec_env.h
	modified:   be/test/exec/pipeline/mem_limited_chunk_queue_test.cpp
	modified:   be/test/exec/pipeline/pipeline_driver_queue_test.cpp
	modified:   be/test/exec/pipeline/query_context_manger_test.cpp
	new file:   be/test/exec/workgroup/mem_tracker_manager_test.cpp
	new file:   be/test/exec/workgroup/work_group_manager_test.cpp

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   be/src/exec/workgroup/work_group.cpp
	both modified:   be/src/runtime/mem_tracker.cpp
	both modified:   be/src/runtime/mem_tracker.h
	both modified:   be/test/CMakeLists.txt

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@wanpengfei-git wanpengfei-git enabled auto-merge (squash) November 12, 2025 11:23
@mergify mergify bot closed this Nov 12, 2025
auto-merge was automatically disabled November 12, 2025 11:23

Pull request was closed

@mergify
Copy link
Contributor Author

mergify bot commented Nov 12, 2025

@mergify[bot]: Backport conflict, please reslove the conflict and resubmit the pr

@mergify
Copy link
Contributor Author

mergify bot commented Nov 12, 2025

🧪 CI Insights

Here's what we observed from your CI run for 5de2a59.

❌ Job Failures

Pipeline Job Health on branch-3.4 Retries 🔍 CI Insights 📄 Logs
PR CHECKER automerge-check Unknown 0 View View

✅ Passed Jobs With Interesting Signals

Pipeline Job Signal Health on branch-3.4 Retries 🔍 CI Insights 📄 Logs
PR CHECKER title-check You had a 50% chance of failing… lucky you! 🎲 Flaky Configure an automatic retry View View

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.

1 participant