Commit ba970b5
authored
branch-4.0: [opt](memory) lazily create column writer when flush memtable for partial update (#59772)
pick #58982
related issue: #58780
Under the load to 5000-columns with 48-bucket wide table , flush
memtable consume lots of memory:

Root cause is all column writers will be created at once when init
VerticalSegmentWriter, and `page_builder` of `_encoding_info ` will
consume lots of memory, this pr introduces lazily creating column writer
when flush memtable for partial update to solve it.
### What problem does this PR solve?
Issue Number: close #xxx
Related PR: #xxx
Problem Summary:
### Release note
None
### Check List (For Author)
- Test <!-- At least one of them must be included. -->
- [ ] Regression test
- [ ] Unit Test
- [ ] Manual test (add detailed scripts or steps below)
- [ ] No need to test or manual test. Explain why:
- [ ] This is a refactor/code format and no logic has been changed.
- [ ] Previous test can cover this change.
- [ ] No code files have been changed.
- [ ] Other reason <!-- Add your reason? -->
- Behavior changed:
- [ ] No.
- [ ] Yes. <!-- Explain the behavior change -->
- Does this need documentation?
- [ ] No.
- [ ] Yes. <!-- Add document PR link here. eg:
apache/doris-website#1214 -->
### Check List (For Reviewer who merge this PR)
- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label <!-- Add branch pick label that this PR
should merge into -->1 parent 93aa5f4 commit ba970b5
File tree
3 files changed
+33
-11
lines changed- be/src
- olap/rowset/segment_v2
- vec/olap
3 files changed
+33
-11
lines changedLines changed: 24 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
310 | 310 | | |
311 | 311 | | |
312 | 312 | | |
313 | | - | |
314 | | - | |
315 | | - | |
| 313 | + | |
| 314 | + | |
316 | 315 | | |
317 | 316 | | |
318 | 317 | | |
| |||
322 | 321 | | |
323 | 322 | | |
324 | 323 | | |
325 | | - | |
326 | | - | |
| 324 | + | |
| 325 | + | |
327 | 326 | | |
328 | 327 | | |
329 | 328 | | |
| |||
535 | 534 | | |
536 | 535 | | |
537 | 536 | | |
| 537 | + | |
538 | 538 | | |
539 | 539 | | |
540 | 540 | | |
| |||
639 | 639 | | |
640 | 640 | | |
641 | 641 | | |
| 642 | + | |
642 | 643 | | |
643 | 644 | | |
644 | 645 | | |
| |||
697 | 698 | | |
698 | 699 | | |
699 | 700 | | |
700 | | - | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
701 | 704 | | |
702 | 705 | | |
703 | 706 | | |
| |||
714 | 717 | | |
715 | 718 | | |
716 | 719 | | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
717 | 731 | | |
718 | 732 | | |
719 | 733 | | |
| |||
788 | 802 | | |
789 | 803 | | |
790 | 804 | | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
791 | 809 | | |
792 | 810 | | |
793 | 811 | | |
| |||
953 | 971 | | |
954 | 972 | | |
955 | 973 | | |
956 | | - | |
957 | | - | |
958 | | - | |
959 | | - | |
960 | 974 | | |
961 | 975 | | |
962 | 976 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
79 | 83 | | |
80 | 84 | | |
81 | 85 | | |
| |||
282 | 286 | | |
283 | 287 | | |
284 | 288 | | |
285 | | - | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
286 | 292 | | |
287 | 293 | | |
288 | 294 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| 96 | + | |
96 | 97 | | |
97 | 98 | | |
98 | 99 | | |
| 100 | + | |
99 | 101 | | |
100 | 102 | | |
101 | 103 | | |
| |||
0 commit comments