Skip to content

Comments

[BUG] Fix parse error when the memory parameter is a float value percentage#5916

Merged
morningman merged 1 commit intoapache:masterfrom
xinyiZzz:conf_storage_page_cache_limit_error
May 27, 2021
Merged

[BUG] Fix parse error when the memory parameter is a float value percentage#5916
morningman merged 1 commit intoapache:masterfrom
xinyiZzz:conf_storage_page_cache_limit_error

Conversation

@xinyiZzz
Copy link
Contributor

Proposed changes

When parsing memory parameters in ParseUtil::parse_mem_spec, convert the percentage to double instead of int.

The currently affected parameters include mem_limit and storage_page_cache_limit

Types of changes

  • Bugfix (non-breaking change which fixes an issue)

Checklist

@xinyiZzz xinyiZzz changed the title [BUG] Fix calculation error when the memory parameter is a float value percentage [BUG] Fix parse error when the memory parameter is a float value percentage May 26, 2021
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.

add some unit test

@xinyiZzz xinyiZzz force-pushed the conf_storage_page_cache_limit_error branch from 931b854 to 22c0798 Compare May 26, 2021 13:14
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

@morningman morningman added approved Indicates a PR has been approved by one committer. kind/fix Categorizes issue or PR as related to a bug. labels May 26, 2021
@morningman morningman merged commit 80f0b5f into apache:master May 27, 2021
stdpain pushed a commit to stdpain/incubator-doris that referenced this pull request Jul 8, 2021
…e percentage (apache#5916)

When parsing memory parameters in `ParseUtil::parse_mem_spec`, convert the percentage to `double` instead of `int`.

The currently affected parameters include `mem_limit` and `storage_page_cache_limit`
seawinde pushed a commit to seawinde/doris that referenced this pull request Jan 30, 2026
…#58317) (apache#5916)

pick doris master apache#58317

---------

Co-authored-by: Jack <jiangkai@selectdb.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. kind/fix Categorizes issue or PR as related to a bug.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] The float value percentage of storage_page_cache_limit will cause the page_cache capacity calculation result to be wrong

2 participants