Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: memory management #13636

Merged
merged 9 commits into from
Nov 25, 2023
Merged

refactor: memory management #13636

merged 9 commits into from
Nov 25, 2023

Conversation

fuyufjh
Copy link
Member

@fuyufjh fuyufjh commented Nov 24, 2023

I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.

What's changed and what's your intention?

This part of code became too shitty due to several changes in the history, so I decided to refactor this part first. This PR is a pure refactor without any changes to the logic.

  • MemoryManager (mostly from GlobalMemoryManager) offers interface to other components and calls the LruWatermarkController in certain interval
  • LruWatermarkController (mostly from JemallocAndJvmMemoryControl) executes the real controlling work, including collecting statistics from Jemalloc & JVM and generate a new LRU watermark epoch.
  • All the config-related things are moved into config.rs

Later, I will do #13610 (comment) on top of this refactoring. (Thinking...)

Checklist

  • I have written necessary rustdoc comments
  • I have added necessary unit tests and integration tests
  • I have added test labels as necessary. See details.
  • I have added fuzzing tests or opened an issue to track them. (Optional, recommended for new SQL features Sqlsmith: Sql feature generation #7934).
  • My PR contains breaking changes. (If it deprecates some features, please create a tracking issue to remove them in the future).
  • All checks passed in ./risedev check (or alias, ./risedev c)
  • My PR changes performance-critical code. (Please run macro/micro-benchmarks and show the results.)
  • My PR contains critical fixes that are necessary to be merged into the latest release. (Please check out the details)

Documentation

  • My PR needs documentation updates. (Please use the Release note section below to summarize the impact on users)

Release note

If this PR includes changes that directly affect users or other significant modifications relevant to the community, kindly draft a release note to provide a concise summary of these changes. Please prioritize highlighting the impact these changes will have on users.

Copy link

codecov bot commented Nov 24, 2023

Codecov Report

Attention: 136 lines in your changes are missing coverage. Please review.

Comparison is base (8b756ae) 68.04% compared to head (23e2ee0) 68.08%.
Report is 16 commits behind head on main.

Files Patch % Lines
src/compute/src/memory/controller.rs 0.00% 87 Missing ⚠️
src/compute/src/memory/manager.rs 0.00% 48 Missing ⚠️
src/compute/src/server.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #13636      +/-   ##
==========================================
+ Coverage   68.04%   68.08%   +0.03%     
==========================================
  Files        1517     1517              
  Lines      261828   261735      -93     
==========================================
+ Hits       178163   178202      +39     
+ Misses      83665    83533     -132     
Flag Coverage Δ
rust 68.08% <0.00%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@yuhao-su yuhao-su left a comment

Choose a reason for hiding this comment

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

LGTM

@fuyufjh fuyufjh added this pull request to the merge queue Nov 25, 2023
Merged via the queue into main with commit a3ea7c0 Nov 25, 2023
8 of 9 checks passed
@fuyufjh fuyufjh deleted the eric/refactor_memory_management branch November 25, 2023 03:30
Little-Wallace added a commit that referenced this pull request Nov 27, 2023
commit a3ea7c0
Author: Eric Fu <[email protected]>
Date:   Sat Nov 25 11:00:48 2023 +0800

    refactor: memory management (#13636)

commit 2348a2b
Author: Bugen Zhao <[email protected]>
Date:   Fri Nov 24 18:26:48 2023 +0800

    fix(streaming): use correct label for `stream_fragment_exchange_bytes` metrics (#13644)

    Signed-off-by: Bugen Zhao <[email protected]>

commit 3ccb249
Author: Runji Wang <[email protected]>
Date:   Fri Nov 24 17:39:12 2023 +0800

    fix: estimate jsonb's value encoding size (#13643)

    Signed-off-by: Runji Wang <[email protected]>

commit 7b21e04
Author: Dylan <[email protected]>
Date:   Fri Nov 24 16:54:38 2023 +0800

    feat(optimizer): improve inline session timezone in exprs (#13640)

Signed-off-by: Little-Wallace <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants