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

[Enhancement] count roaring bitmap memory usage in aggregator #49206

Merged
merged 17 commits into from
Aug 8, 2024

Conversation

silverbullet233
Copy link
Contributor

@silverbullet233 silverbullet233 commented Jul 31, 2024

Why I'm doing:

What I'm doing:

  1. introduce CountingAllocator to count memory usage for specific modules.
  2. add an allocator in Aggregator to count heap memory usage of agg states.
  3. introduce AggregateStateAllocator which is a STL-compitable Allocator. it will used by containers in different agg states to count memory. in this pr, I added it into distinct agg state to replace the original CountingAllocator

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
    • 3.3
    • 3.2
    • 3.1
    • 3.0
    • 2.5

be/src/service/mem_hook.cpp Outdated Show resolved Hide resolved
Signed-off-by: silverbullet233 <[email protected]>
Signed-off-by: silverbullet233 <[email protected]>
This reverts commit 9c31a66.

Signed-off-by: silverbullet233 <[email protected]>
Signed-off-by: silverbullet233 <[email protected]>
Signed-off-by: silverbullet233 <[email protected]>
Signed-off-by: silverbullet233 <[email protected]>
Signed-off-by: silverbullet233 <[email protected]>
Signed-off-by: silverbullet233 <[email protected]>
Signed-off-by: silverbullet233 <[email protected]>
@silverbullet233 silverbullet233 changed the title [WIP][Enhancement] count roaring bitmap memory usage in aggregator [Enhancement] count roaring bitmap memory usage in aggregator Aug 5, 2024
Signed-off-by: silverbullet233 <[email protected]>
Signed-off-by: silverbullet233 <[email protected]>
Signed-off-by: silverbullet233 <[email protected]>
Signed-off-by: silverbullet233 <[email protected]>
be/src/service/mem_hook.cpp Outdated Show resolved Hide resolved
Signed-off-by: silverbullet233 <[email protected]>
Signed-off-by: silverbullet233 <[email protected]>
@stdpain stdpain enabled auto-merge (squash) August 8, 2024 08:40
Copy link

github-actions bot commented Aug 8, 2024

[FE Incremental Coverage Report]

pass : 0 / 0 (0%)

Copy link

github-actions bot commented Aug 8, 2024

[BE Incremental Coverage Report]

fail : 88 / 150 (58.67%)

file detail

path covered_line new_line coverage not_covered_line_detail
🔵 be/src/exec/aggregator.h 0 3 00.00% [298, 302, 304]
🔵 be/src/runtime/memory/counting_allocator.h 13 42 30.95% [50, 51, 52, 53, 56, 57, 58, 59, 61, 62, 63, 64, 66, 67, 68, 69, 72, 73, 74, 75, 78, 79, 80, 81, 84, 85, 86, 87, 90]
🔵 be/src/service/mem_hook.cpp 39 67 58.21% [140, 141, 151, 176, 189, 190, 200, 212, 223, 241, 244, 245, 246, 260, 262, 263, 264, 286, 312, 314, 315, 316, 338, 340, 341, 342, 364, 378]
🔵 be/src/exprs/agg/distinct.h 17 19 89.47% [57, 486]
🔵 be/src/exec/aggregator.cpp 12 12 100.00% []
🔵 be/src/exprs/agg/aggregate_state_allocator.h 7 7 100.00% []

@andyziye andyziye disabled auto-merge August 8, 2024 11:17
@andyziye andyziye merged commit 0d99ed0 into StarRocks:main Aug 8, 2024
46 of 47 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants