Skip to content

[cherry-pick](branch-21) fix append_data_by_selector_impl reserve too mush useless memory (#39581)#39635

Merged
yiguolei merged 1 commit intoapache:branch-2.1from
zhangstar333:branch-2.1-pick-6
Aug 21, 2024
Merged

[cherry-pick](branch-21) fix append_data_by_selector_impl reserve too mush useless memory (#39581)#39635
yiguolei merged 1 commit intoapache:branch-2.1from
zhangstar333:branch-2.1-pick-6

Conversation

@zhangstar333
Copy link
Copy Markdown
Contributor

Proposed changes

cherry-pick from master #39581

…ss memory (apache#39581)

## Proposed changes

```
for (auto* place : local_state._value_places) {
                            SCOPED_TIMER(local_state._selector_block_timer);
                            RETURN_IF_ERROR(place->append_block_by_selector(input_block, eos));
}
    for (int i = 0; i < mutable_columns.size(); ++i) {
        columns[i]->append_data_by_selector(mutable_columns[i], _selector);
    }
```
the columns[I] size is 4096, and _selector size is 1;
so the (4096 - 1) rows is useless;
in a usercase, the block have 4096 rows and 34 columns.
so need bytes is:
1 block * 4096 rows * 4096 reserve * 16 bytes * 34 column * 48 instance
= 438086664192 bytes;

it's will cause the query canceled as not have enough memory.
@doris-robot
Copy link
Copy Markdown

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

Since 2024-03-18, the Document has been moved to doris-website.
See Doris Document.

@zhangstar333
Copy link
Copy Markdown
Contributor Author

run buildall

@yiguolei yiguolei merged commit 7bb83ae into apache:branch-2.1 Aug 21, 2024
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.

3 participants