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

HDDS-11140. Recon Disk Usage Metadata Details are not working for du api #6966

Merged
merged 2 commits into from
Jul 25, 2024

Conversation

smitajoshi12
Copy link
Contributor

@smitajoshi12 smitajoshi12 commented Jul 19, 2024

What changes were proposed in this pull request?

Metadata summary was not working properly for Entity Type Key.

Please describe your PR in detail:
Metadata summary was not working properly for Entity Type Key.
File Size and File Size Replication was not working earlier so corrected in this PR.

What is the link to the Apache JIRA

(https://issues.apache.org/jira/browse/HDDS-11140)

How was this patch tested?

Manually with Cluster Data

Before this Patch

File Size and File Size Replication was not present in Metadata Summary for Entity Type Key

api/v1/namespace/du?path=/s3v/fso-bucket/dir1/key1-fso&files=true&sortSubPaths=true
{
"path": "/s3v/fso-bucket/dir1/key1-fso",
"type": "KEY",
"countStats": {
"numVolume": 100,
"numBucket": 200,
"numDir": 400,
"numKey": 80
}
"status": "OK"
}

After this Patch

api/v1/namespace/du?path=/s3v/fso-bucket/dir1/key1-fso&files=true&sortSubPaths=true
{
"path": "/s3v/fso-bucket/dir1/key1-fso",
"type": "KEY",
"countStats": {
"numVolume": 100,
"numBucket": 200,
"numDir": 400,
"numKey": 80
}
"status": "OK"
}

Response is same for namespace api there is no change from backend. Recon UI was not handling below api
/api/v1/namespace/du?path=/s3v/fso-bucket/dir1/key1-fso&replica=true properly for Entity Type = Key so changed UI code below api will get called from UI.

For Entity Type KEY

Request :- /api/v1/namespace/du?path=/s3v/fso-bucket/dir1/key1-fso&replica=true

Response:- {
"status": "OK",
"path": "/s3v/fso-bucket/dir1/key1-fso",
"size": 17289,
"sizeWithReplica": 17289,
"subPathCount": 0,
"subPaths": [],
"sizeDirectKey": -1
}

image

@ArafatKhan2198
Copy link
Contributor

@smitajoshi12, thank you for working on this.

Could you please show us the error message that appeared earlier and how it is displayed in the UI after the fix?

@smitajoshi12
Copy link
Contributor Author

@smitajoshi12, thank you for working on this.

Could you please show us the error message that appeared earlier and how it is displayed in the UI after the fix?

@ArafatKhan2198 @devabhishekpal
I have added details in before patch as File Size and File Size Replication was missing for Entity Type= KEY

@ArafatKhan2198
Copy link
Contributor

Hi @smitajoshi12,

I'm having trouble understanding the changes we've implemented here. Have we modified the response? The responses before and after the patch seem completely different. Could you please clarify what the behaviour was previously and what it is now?

Copy link
Contributor

@ArafatKhan2198 ArafatKhan2198 left a comment

Choose a reason for hiding this comment

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

Thanks for making changes to the PR description @smitajoshi12
Makes more sense now.
Changes LGTM!

Copy link
Contributor

@devabhishekpal devabhishekpal left a comment

Choose a reason for hiding this comment

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

Thanks @smitajoshi12 for the updated description.
This looks good to me, +1

@ArafatKhan2198
Copy link
Contributor

Thanks for the patch @smitajoshi12 thanks for the review @devabhishekpal

@ArafatKhan2198 ArafatKhan2198 merged commit 96e1a8c into apache:master Jul 25, 2024
39 checks passed
@smitajoshi12 smitajoshi12 deleted the HDDS-11140 branch July 25, 2024 15:57
xichen01 pushed a commit to xichen01/ozone that referenced this pull request Jul 26, 2024
xichen01 pushed a commit to xichen01/ozone that referenced this pull request Jul 26, 2024
xichen01 pushed a commit to xichen01/ozone that referenced this pull request Jul 26, 2024
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.

4 participants