Skip to content

branch-4.0: [opt](memory) reuse tablet schema in load path #58476 - #58847

Merged
yiguolei merged 1 commit into
branch-4.0from
auto-pick-58476-branch-4.0
Jan 5, 2026
Merged

branch-4.0: [opt](memory) reuse tablet schema in load path #58476#58847
yiguolei merged 1 commit into
branch-4.0from
auto-pick-58476-branch-4.0

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Cherry-picked from #58476

### What problem does this PR solve?
#### Background
`build_current_tablet_schema` may consume a significant amount of memory
when load to a wide table with a large number of buckets:
<img width="716" height="718" alt="image"
src="https://github.com/user-attachments/assets/0b08c807-39df-4ab5-b7af-5896e1265009"
/>
#### Solution
Reuse tablet schema in load path to save load memory.
#### Test Result
Machine configuration: 16c 64G 3BE
Table Schema: 5000 column, 256 bucket
Each Be reduces 1G memory.
@Thearas

Copy link
Copy Markdown
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@Thearas

Copy link
Copy Markdown
Contributor

run buildall

@hello-stephen

Copy link
Copy Markdown
Contributor

BE UT Coverage Report

Increment line coverage 0.00% (0/16) 🎉

Increment coverage report
Complete coverage report

CategoryCoverage
Function Coverage53.18% (18350/34507)
Line Coverage38.76% (168699/435210)
Region Coverage33.55% (130568/389182)
Branch Coverage34.44% (56291/163449)

@sollhui

Copy link
Copy Markdown
Contributor

run buildall

@hello-stephen

Copy link
Copy Markdown
Contributor

BE UT Coverage Report

Increment line coverage 0.00% (0/16) 🎉

Increment coverage report
Complete coverage report

CategoryCoverage
Function Coverage53.28% (18672/35045)
Line Coverage39.10% (172982/442437)
Region Coverage33.79% (133708/395708)
Branch Coverage34.77% (57817/166286)

@github-actionsgithub-actionsBot added the approved Indicates a PR has been approved by one committer. label Jan 5, 2026
@github-actions

Copy link
Copy Markdown
ContributorAuthor

PR approved by at least one committer and no changes requested.

@github-actions

Copy link
Copy Markdown
ContributorAuthor

PR approved by anyone and no changes requested.

@yiguolei
yiguolei merged commit 6e38e04 into branch-4.0Jan 5, 2026
24 of 27 checks passed
@github-actions
github-actionsBot deleted the auto-pick-58476-branch-4.0 branch January 5, 2026 10:33
ybtsdst pushed a commit to ybtsdst/doris that referenced this pull request Feb 27, 2026
… (apache#58847)
Cherry-picked from apache#58476
Co-authored-by: hui lai <laihui@selectdb.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approvedIndicates a PR has been approved by one committer.reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@Thearas@hello-stephen@sollhui@yiguolei@dataroaring