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

enhance: Optimize GetLocalDiskSize and segment loader mutex #38599

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

bigsheeper
Copy link
Contributor

  1. Make the segment loader lock protect only the resource.
  2. Optimize GetDiskUsage to avoid excessive overhead.

issue: #37630

@sre-ci-robot sre-ci-robot added the size/L Denotes a PR that changes 100-499 lines. label Dec 19, 2024
@sre-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: bigsheeper
To complete the pull request process, please assign jiaoew1991 after the PR has been reviewed.
You can assign the PR to them by writing /assign @jiaoew1991 in a comment when ready.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@mergify mergify bot added dco-passed DCO check passed. kind/enhancement Issues or changes related to enhancement labels Dec 19, 2024
czs007 pushed a commit that referenced this pull request Dec 19, 2024
…38600)

1. Make the segment loader lock protect only the resource.
2. Optimize GetDiskUsage to avoid excessive overhead.

issue: #37630

pr: #38599

Signed-off-by: bigsheeper <[email protected]>
Signed-off-by: bigsheeper <[email protected]>
Signed-off-by: bigsheeper <[email protected]>
Signed-off-by: bigsheeper <[email protected]>
Copy link
Contributor

mergify bot commented Dec 19, 2024

@bigsheeper E2e jenkins job failed, comment /run-cpu-e2e can trigger the job again.

Copy link

codecov bot commented Dec 19, 2024

Codecov Report

Attention: Patch coverage is 89.65517% with 6 lines in your changes missing coverage. Please review.

Project coverage is 82.95%. Comparing base (e6bf141) to head (7fc73e4).
Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
...nternal/querynodev2/segments/disk_usage_fetcher.go 84.84% 4 Missing and 1 partial ⚠️
internal/querynodev2/segments/segment_loader.go 93.33% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #38599      +/-   ##
==========================================
+ Coverage   81.14%   82.95%   +1.81%     
==========================================
  Files        1387     1092     -295     
  Lines      196269   169763   -26506     
==========================================
- Hits       159257   140830   -18427     
+ Misses      31414    23346    -8068     
+ Partials     5598     5587      -11     
Components Coverage Δ
Client 79.12% <ø> (ø)
Core ∅ <ø> (∅)
Go 83.10% <89.65%> (+<0.01%) ⬆️
Files with missing lines Coverage Δ
internal/querynodev2/segments/segment.go 65.02% <ø> (-0.14%) ⬇️
internal/querynodev2/server.go 77.86% <100.00%> (ø)
internal/util/segcore/cgo_util.go 88.46% <100.00%> (ø)
pkg/util/paramtable/component_param.go 98.39% <100.00%> (+<0.01%) ⬆️
internal/querynodev2/segments/segment_loader.go 72.96% <93.33%> (+0.08%) ⬆️
...nternal/querynodev2/segments/disk_usage_fetcher.go 84.84% <84.84%> (ø)

... and 323 files with indirect coverage changes

Copy link
Contributor

mergify bot commented Dec 19, 2024

@bigsheeper go-sdk check failed, comment rerun go-sdk can trigger the job again.

@bigsheeper bigsheeper added the 10kcp PR related to 10k collection partitions Project label Dec 30, 2024
@mergify mergify bot removed the ci-passed label Dec 31, 2024
Copy link
Contributor

mergify bot commented Dec 31, 2024

@bigsheeper go-sdk check failed, comment rerun go-sdk can trigger the job again.

@bigsheeper
Copy link
Contributor Author

rerun go-sdk

Signed-off-by: bigsheeper <[email protected]>
@mergify mergify bot removed the ci-passed label Jan 3, 2025
Copy link
Contributor

mergify bot commented Jan 3, 2025

@bigsheeper E2e jenkins job failed, comment /run-cpu-e2e can trigger the job again.

Copy link
Contributor

mergify bot commented Jan 3, 2025

@bigsheeper go-sdk check failed, comment rerun go-sdk can trigger the job again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
10kcp PR related to 10k collection partitions Project dco-passed DCO check passed. kind/enhancement Issues or changes related to enhancement size/L Denotes a PR that changes 100-499 lines.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants