Skip to content

feat: track disk usage of regions#1125

Merged
v0y4g3r merged 3 commits intoGreptimeTeam:developfrom
lizhemingi:add-file-size
Mar 7, 2023
Merged

feat: track disk usage of regions#1125
v0y4g3r merged 3 commits intoGreptimeTeam:developfrom
lizhemingi:add-file-size

Conversation

@lizhemingi
Copy link
Copy Markdown
Contributor

@lizhemingi lizhemingi commented Mar 5, 2023

I hereby agree to the terms of the GreptimeDB CLA

What's changed and what's your intention?

Track disk usage of regions.

Please explain IN DETAIL what the changes are in this PR and why they are needed:

  • Add file size info after a sst file is written.
  • Add a statistics_collector mod for resource statistics info collection in region.
  • Increase or decrease disk usage when a RegionEdit happens.
    image
    image

Checklist

  • I have written the necessary rustdoc comments.
  • I have added the necessary unit tests and integration tests.

Refer to a related PR or issue link (optional)

#1003

Signed-off-by: Zheming Li <nkdudu@126.com>
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 5, 2023

Codecov Report

Merging #1125 (c0eb2e6) into develop (bd065ea) will increase coverage by 0.03%.
The diff coverage is 74.32%.

@@             Coverage Diff             @@
##           develop    #1125      +/-   ##
===========================================
+ Coverage    85.02%   85.06%   +0.03%     
===========================================
  Files          474      474              
  Lines        69073    69957     +884     
===========================================
+ Hits         58732    59511     +779     
- Misses       10341    10446     +105     

@v0y4g3r v0y4g3r requested review from fengjiachun and v0y4g3r March 6, 2023 06:43
Comment thread src/storage/src/statistics_collector.rs Outdated
Comment thread src/storage/src/sst.rs
@v0y4g3r v0y4g3r requested a review from evenyag March 6, 2023 07:15
Comment thread src/storage/src/region/writer.rs Outdated
Copy link
Copy Markdown
Contributor

@evenyag evenyag left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown
Contributor

@v0y4g3r v0y4g3r left a comment

Choose a reason for hiding this comment

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

LGTM

@v0y4g3r v0y4g3r merged commit b70672b into GreptimeTeam:develop Mar 7, 2023
@evenyag evenyag mentioned this pull request Mar 8, 2023
2 tasks
paomian pushed a commit to paomian/greptimedb that referenced this pull request Oct 19, 2023
* feat: track disk usage of regions

Signed-off-by: Zheming Li <nkdudu@126.com>

* calculate disk usage when call

* add default on file meta

---------

Signed-off-by: Zheming Li <nkdudu@126.com>
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