Commit 1bcfd51
authored
pick #58275
Now, pages of column writer will be released after write all memtable
block in the scenario of partial updates, the process is as follows:
1. create all column_writer
2. append all column_writer (significant amount of memory expansion)
3. finish and free memory. This implement will cause a significant
amount of memory expansion when flushing memtable(The larger the number
of columns, the more obvious it is), and make load could easily
cancelled by memory manager when table column too wide(such as 5000
column).
This pr implement freeing memory column by column for partial update to
solve the problem, the process is as follows:
1. create all column_writer
2. append column_writer and free memory column by column. Test using
machines with specifications of 16c and 64G with 5000 column table:
- Before this pr, `VerticalSegmentWriter::_create_column_writer`
occupies nearly 20% of the memory.
- After fix, ` VerticalSegmentWriter::_create_column_writer` hardly
occupies memory.
### 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 cafd800 commit 1bcfd51
File tree
2 files changed
+20
-20
lines changed- be/src/olap/rowset/segment_v2
2 files changed
+20
-20
lines changedLines changed: 18 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
451 | 451 | | |
452 | 452 | | |
453 | 453 | | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
454 | 467 | | |
455 | 468 | | |
456 | 469 | | |
| |||
540 | 553 | | |
541 | 554 | | |
542 | 555 | | |
| 556 | + | |
543 | 557 | | |
544 | 558 | | |
545 | 559 | | |
| |||
629 | 643 | | |
630 | 644 | | |
631 | 645 | | |
| 646 | + | |
632 | 647 | | |
633 | 648 | | |
634 | 649 | | |
| |||
726 | 741 | | |
727 | 742 | | |
728 | 743 | | |
| 744 | + | |
729 | 745 | | |
730 | 746 | | |
731 | 747 | | |
| |||
771 | 787 | | |
772 | 788 | | |
773 | 789 | | |
| 790 | + | |
774 | 791 | | |
775 | 792 | | |
776 | 793 | | |
| |||
932 | 949 | | |
933 | 950 | | |
934 | 951 | | |
935 | | - | |
936 | | - | |
937 | | - | |
938 | | - | |
939 | | - | |
940 | | - | |
941 | | - | |
942 | | - | |
943 | | - | |
944 | | - | |
945 | | - | |
946 | 952 | | |
947 | 953 | | |
948 | 954 | | |
| |||
992 | 998 | | |
993 | 999 | | |
994 | 1000 | | |
995 | | - | |
996 | | - | |
997 | | - | |
998 | | - | |
999 | | - | |
1000 | | - | |
1001 | | - | |
1002 | | - | |
1003 | | - | |
| 1001 | + | |
1004 | 1002 | | |
1005 | 1003 | | |
1006 | 1004 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
| 201 | + | |
| 202 | + | |
201 | 203 | | |
202 | 204 | | |
203 | 205 | | |
| |||
0 commit comments