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

[BugFix] Fix the problem that Stream/Routine Load memory statistics are not accurate. #48587

Merged
merged 1 commit into from
Jul 19, 2024

Conversation

stdpain
Copy link
Contributor

@stdpain stdpain commented Jul 18, 2024

Why I'm doing:

in routine load ByteBuffer is allocate from kafka thread (process memory tracker)
kafka-thread pool->KafkaDataConsumerGroup::start_all -> KafkaConsumerPipe::append_with_row_delimiter

but it was release in instance memory tracker
FileScanNode->thread pool -> CSVReader -> read()

so when PlanfragmentExecutor. the instance tracker will be a negative number

What I'm doing:

Fixes #issue

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

@stdpain stdpain requested review from a team as code owners July 18, 2024 14:01
@github-actions github-actions bot added the 3.3 label Jul 19, 2024
Copy link

[FE Incremental Coverage Report]

pass : 0 / 0 (0%)

Copy link

[BE Incremental Coverage Report]

fail : 16 / 26 (61.54%)

file detail

path covered_line new_line coverage not_covered_line_detail
🔵 be/src/exec/json_scanner.cpp 0 1 00.00% [675]
🔵 be/src/http/action/transaction_stream_load.cpp 0 3 00.00% [532, 547, 562]
🔵 be/src/runtime/routine_load/kafka_consumer_pipe.h 0 1 00.00% [70]
🔵 be/src/http/action/stream_load.cpp 2 5 40.00% [291, 366, 367]
🔵 be/src/runtime/stream_load/stream_load_pipe.cpp 3 4 75.00% [198]
🔵 be/src/util/byte_buffer.h 11 12 91.67% [71]

@kangkaisen kangkaisen merged commit 321ce64 into StarRocks:main Jul 19, 2024
59 of 60 checks passed
Copy link

@Mergifyio backport branch-3.3

@github-actions github-actions bot removed the 3.3 label Jul 19, 2024
Copy link
Contributor

mergify bot commented Jul 19, 2024

backport branch-3.3

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Jul 19, 2024
…re not accurate. (#48587)

Signed-off-by: stdpain <[email protected]>
(cherry picked from commit 321ce64)
wanpengfei-git pushed a commit that referenced this pull request Jul 24, 2024
dujijun007 pushed a commit to dujijun007/starrocks that referenced this pull request Jul 29, 2024
srlch added a commit to srlch/starrocks that referenced this pull request Aug 2, 2024
…stion

Why I'm doing:
In this pr StarRocks#48587, process memory tracker was introduced to track the memory
usage in ByteBuffer allocation. But currently, ByteBuffer is only used for
data ingestion and we should track using load memory track and limited by
the tracker.

What I'm doing:
1. Use load memory tracker instead.
2. limit the memory allocation using this tracker.

Signed-off-by: srlch <[email protected]>
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.

4 participants