Skip to content

This PR is to add comments to totalFileNumsInternal in pkg\ddc\alluxio\ufs_internal.go.#5882

Open
cah54321 wants to merge 2 commits into
fluid-cloudnative:masterfrom
cah54321:new-branch
Open

This PR is to add comments to totalFileNumsInternal in pkg\ddc\alluxio\ufs_internal.go.#5882
cah54321 wants to merge 2 commits into
fluid-cloudnative:masterfrom
cah54321:new-branch

Conversation

@cah54321
Copy link
Copy Markdown

Ⅰ. Describe what this PR does

This PR is to add comments to totalFileNumsInternal in pkg\ddc\alluxio\ufs_internal.go.

Ⅱ. Does this pull request fix one issue?

fixes #5881

Ⅲ. Special notes for reviews

This is a corrected version. In addition to commenting on the required totalFileNumsInternal function, comments have also been added for the freeStorageBytesInternal function and totalStorageBytesInternal function.

@fluid-e2e-bot
Copy link
Copy Markdown

fluid-e2e-bot Bot commented May 15, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign zwwhdls for approval by writing /assign @zwwhdls in a comment. For more information see:The Kubernetes Code Review Process.

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

Details 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

@fluid-e2e-bot
Copy link
Copy Markdown

fluid-e2e-bot Bot commented May 15, 2026

Hi @cah54321. Thanks for your PR.

I'm waiting for a fluid-cloudnative member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@sonarqubecloud
Copy link
Copy Markdown

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request adds documentation comments to the freeStorageBytesInternal, totalStorageBytesInternal, and totalFileNumsInternal functions within the Alluxio engine. The review feedback suggests enhancing these comments by explicitly noting that freeStorageBytesInternal is currently a placeholder and refining the description of totalStorageBytesInternal to 'total size' to more accurately represent its data-counting implementation.

return
}

// freeStorageBytesInternal returns the number of bytes currently available in Alluxio storage.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The comment for freeStorageBytesInternal is incomplete as it does not mention that the function is currently a placeholder returning (0, nil). For consistency with the neighboring usedStorageBytesInternal function, it should explicitly state its placeholder status to avoid misleading future developers.

// freeStorageBytesInternal returns the number of bytes currently available in Alluxio storage.
// It currently returns (0, nil) as a placeholder; the actual implementation should query
// the Alluxio cluster to compute the free storage capacity.

return
}

// totalStorageBytesInternal returns the total capacity in bytes of the Alluxio file system.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The term 'total capacity' in the comment is misleading. The implementation uses fileUitls.Count("/"), which returns the aggregate size of all files (data volume) in the file system, rather than the storage capacity (the upper limit of the storage medium). Describing it as the 'total size' would be more accurate.

Suggested change
// totalStorageBytesInternal returns the total capacity in bytes of the Alluxio file system.
// totalStorageBytesInternal returns the total size in bytes of the data in the Alluxio file system.

@cheyang
Copy link
Copy Markdown
Collaborator

cheyang commented May 15, 2026

👋 DCO check failed for this PR (action_required). Please ensure all commits include the Signed-off-by: Name <email> line. You can fix this by amending your commits with git commit --amend --signoff and force-pushing.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 61.65%. Comparing base (242a0bd) to head (8c84744).
⚠️ Report is 73 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5882      +/-   ##
==========================================
+ Coverage   61.22%   61.65%   +0.42%     
==========================================
  Files         444      480      +36     
  Lines       30557    32613    +2056     
==========================================
+ Hits        18710    20108    +1398     
- Misses      10307    10897     +590     
- Partials     1540     1608      +68     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

Add comments to totalFileNumsInternal in pkg\ddc\alluxio\ufs_internal.go

2 participants