Skip to content

Conversation

@martinr0x
Copy link
Contributor

@martinr0x martinr0x commented Oct 15, 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.

@martinr0x martinr0x requested review from a team as code owners October 15, 2025 22:38
@wanpengfei-git wanpengfei-git requested a review from a team October 15, 2025 22:39
@martinr0x martinr0x force-pushed the mbogusz/use-mem-pool-be branch 2 times, most recently from 37da6f2 to 041cab4 Compare October 16, 2025 02:35
@martinr0x martinr0x changed the title [Feature] Use mem_pool property to create shared mem_tracker across resource groups [Enhancement] Use mem_pool property to create shared mem_tracker across resource groups Oct 16, 2025
@martinr0x martinr0x changed the title [Enhancement] Use mem_pool property to create shared mem_tracker across resource groups [Feature] Use mem_pool property to create shared mem_tracker across resource groups Oct 16, 2025
@martinr0x martinr0x force-pushed the mbogusz/use-mem-pool-be branch 5 times, most recently from 2d16a0b to 5679186 Compare October 19, 2025 14:42
@alvin-celerdata
Copy link
Contributor

@cursor review

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no bugs!


@martinr0x martinr0x force-pushed the mbogusz/use-mem-pool-be branch from 5b0a846 to 5032012 Compare October 26, 2025 06:34
@murphyatwork
Copy link
Contributor

@Mergifyio rebase

@mergify
Copy link
Contributor

mergify bot commented Nov 6, 2025

rebase

✅ Branch has been successfully rebased

@murphyatwork murphyatwork force-pushed the mbogusz/use-mem-pool-be branch from 5032012 to 60b088f Compare November 6, 2025 12:57
@alvin-celerdata
Copy link
Contributor

@cursor review

@murphyatwork murphyatwork merged commit 47e49db into StarRocks:main Nov 12, 2025
82 of 84 checks passed
@github-actions
Copy link
Contributor

@Mergifyio backport branch-3.4

@github-actions
Copy link
Contributor

@Mergifyio backport branch-3.5

@mergify
Copy link
Contributor

mergify bot commented Nov 12, 2025

backport branch-3.4

✅ Backports have been created

Details

@mergify
Copy link
Contributor

mergify bot commented Nov 12, 2025

backport branch-3.5

✅ Backports have been created

Details

mergify bot pushed a commit that referenced this pull request Nov 12, 2025
…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 bot pushed a commit that referenced this pull request Nov 12, 2025
martinr0x added a commit to martinr0x/starrocks that referenced this pull request Nov 13, 2025
martinr0x added a commit to martinr0x/starrocks that referenced this pull request Nov 14, 2025
martinr0x added a commit to martinr0x/starrocks that referenced this pull request Nov 14, 2025
murphyatwork pushed a commit that referenced this pull request Nov 14, 2025
chris-celerdata pushed a commit to chris-celerdata/starrocks that referenced this pull request Nov 14, 2025
zhaohehuhu pushed a commit to zhaohehuhu/starrocks that referenced this pull request Nov 19, 2025
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.

7 participants