Skip to content

[enhancement](load) make default load mem limit configurable#12348

Merged
yiguolei merged 4 commits intoapache:masterfrom
Henry2SS:whz-fix-stream-load-mem
Sep 12, 2022
Merged

[enhancement](load) make default load mem limit configurable#12348
yiguolei merged 4 commits intoapache:masterfrom
Henry2SS:whz-fix-stream-load-mem

Conversation

@Henry2SS
Copy link
Contributor

@Henry2SS Henry2SS commented Sep 5, 2022

Proposed changes

Issue Number: close #xxx

Problem summary

Describe your changes.

Checklist(Required)

  1. Does it affect the original behavior:
    • Yes
    • No
    • I don't know
  2. Has unit tests been added:
    • Yes
    • No
    • No Need
  3. Has document been added or modified:
    • Yes
    • No
    • No Need
  4. Does it need to update dependencies:
    • Yes
    • No
  5. Are there any changes that cannot be rolled back:
    • Yes (If Yes, please explain WHY)
    • No

Further comments

If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...

@github-actions github-actions bot added area/load Issues or PRs related to all kinds of load area/routine load labels Sep 5, 2022
@Henry2SS Henry2SS force-pushed the whz-fix-stream-load-mem branch from c6eaf78 to f21c08a Compare September 5, 2022 10:39
@Henry2SS Henry2SS changed the title [enhancement](stream load) make stream load mem limit configurable [enhancement](stream load) make default load mem limit configurable Sep 5, 2022
@Henry2SS Henry2SS changed the title [enhancement](stream load) make default load mem limit configurable [enhancement](load) make default load mem limit configurable Sep 5, 2022
caiconghui
caiconghui previously approved these changes Sep 5, 2022
Copy link
Contributor

@caiconghui caiconghui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Sep 5, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Sep 5, 2022

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

@github-actions
Copy link
Contributor

github-actions bot commented Sep 5, 2022

PR approved by anyone and no changes requested.

@github-actions github-actions bot removed the approved Indicates a PR has been approved by one committer. label Sep 5, 2022
Copy link
Contributor

@morningman morningman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already had a load_mem_limit session variable for this purpose.
I think we should use that instead of adding a new config.

@Henry2SS
Copy link
Contributor Author

Henry2SS commented Sep 6, 2022

We already had a load_mem_limit session variable for this purpose. I think we should use that instead of adding a new config.

the defaut value of load_mem_limit is 0. And it means there is no limit. And it is mainly for INSERT INTO operations.
it is okay to set it to 2G by default?

@Henry2SS Henry2SS force-pushed the whz-fix-stream-load-mem branch from bf33741 to 3b036fc Compare September 6, 2022 06:53
@Henry2SS Henry2SS force-pushed the whz-fix-stream-load-mem branch 2 times, most recently from ecefaa5 to 326ce0e Compare September 7, 2022 10:32
@xinyiZzz
Copy link
Contributor

xinyiZzz commented Sep 7, 2022

runtime_state.cpp the code below should be removed and replaced with _query_options.load_mem_limit.

int64_t RuntimeState::get_load_mem_limit() {
    if (_query_options.__isset.load_mem_limit && _query_options.load_mem_limit > 0) {
        return _query_options.load_mem_limit;
    } else {
        return _query_mem_tracker->limit();
    }
}

@xinyiZzz
Copy link
Contributor

xinyiZzz commented Sep 8, 2022

runtime_state.cpp the code below should be removed and replaced with _query_options.load_mem_limit.

int64_t RuntimeState::get_load_mem_limit() {
    if (_query_options.__isset.load_mem_limit && _query_options.load_mem_limit > 0) {
        return _query_options.load_mem_limit;
    } else {
        return _query_mem_tracker->limit();
    }
}

To ensure compatibility during the upgrade process, cannot be removed now
Consider recording a TODO in runtime_state.cpp, the code is abandoned, it can be deleted after v1.3

@Henry2SS
Copy link
Contributor Author

Henry2SS commented Sep 8, 2022

runtime_state.cpp the code below should be removed and replaced with _query_options.load_mem_limit.

int64_t RuntimeState::get_load_mem_limit() {
    if (_query_options.__isset.load_mem_limit && _query_options.load_mem_limit > 0) {
        return _query_options.load_mem_limit;
    } else {
        return _query_mem_tracker->limit();
    }
}

To ensure compatibility during the upgrade process, cannot be removed now Consider recording a TODO in runtime_state.cpp, the code is abandoned, it can be deleted after v1.3

OK. Thx for your advice.

@Henry2SS Henry2SS force-pushed the whz-fix-stream-load-mem branch from 326ce0e to 8e7050e Compare September 8, 2022 03:16
xinyiZzz
xinyiZzz previously approved these changes Sep 8, 2022
Copy link
Contributor

@xinyiZzz xinyiZzz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

caiconghui
caiconghui previously approved these changes Sep 8, 2022
Copy link
Contributor

@caiconghui caiconghui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@caiconghui caiconghui added the approved Indicates a PR has been approved by one committer. label Sep 8, 2022
@github-actions github-actions bot removed the approved Indicates a PR has been approved by one committer. label Sep 8, 2022
@caiconghui caiconghui added the approved Indicates a PR has been approved by one committer. label Sep 9, 2022
caiconghui
caiconghui previously approved these changes Sep 9, 2022
Copy link
Contributor

@caiconghui caiconghui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@github-actions github-actions bot removed the approved Indicates a PR has been approved by one committer. label Sep 9, 2022
@Henry2SS Henry2SS requested a review from morningman September 9, 2022 06:55
Copy link
Contributor

@morningman morningman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but please add some document for this config

@Henry2SS
Copy link
Contributor Author

Henry2SS commented Sep 9, 2022

LGTM, but please add some document for this config

Done.

Copy link
Contributor

@morningman morningman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@github-actions github-actions bot added kind/docs Categorizes issue or PR as related to documentation. approved Indicates a PR has been approved by one committer. labels Sep 9, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Sep 9, 2022

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

@yiguolei yiguolei merged commit ecfefae into apache:master Sep 12, 2022
yiguolei pushed a commit that referenced this pull request Sep 16, 2022
* make LoadMemLimit valid for broker load, stream load and routine load

Co-authored-by: wuhangze <wuhangze@jd.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by one committer. area/load Issues or PRs related to all kinds of load area/routine load dev/merged-1.1.3-deprecated kind/docs Categorizes issue or PR as related to documentation. kind/test reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants