-
Notifications
You must be signed in to change notification settings - Fork 590
HDDS-11023. Recon Disk Usage null conditions not handled properly for null response #6894
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
Conversation
|
@devabhishekpal @dombizita @devmadhuu @ArafatKhan2198 Can you review this pr |
ArafatKhan2198
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the patch @smitajoshi12
Some minor comments
...one/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/diskUsage/diskUsage.tsx
Outdated
Show resolved
Hide resolved
...one/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/diskUsage/diskUsage.tsx
Show resolved
Hide resolved
...one/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/diskUsage/diskUsage.tsx
Outdated
Show resolved
Hide resolved
devabhishekpal
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @smitajoshi12 , the patch looks good to me now.
Please do take a look at @ArafatKhan2198's comment for replica=false and raise the JIRA.
@devabhishekpal |
|
Thanks for working on this patch, @smitajoshi12 I appreciate you catching this issue and implementing the necessary changes. However, I believe we can present the information displayed to the user about Namespace initialization in a much clearer way, as the Namespace can be in initialization mode for two specific reasons:
It's important for the user to know that there is no problem with the data; rather, there is just a delay in building the NSSummary. Instead of having the user click the "Show Metadata for Current Path" button, we should display a pop-up message. This message should not be an alert but a simple notification indicating that the state is initializing and that they need to wait. Additionally, the error message shown in the screenshot can be improved to something more user-friendly like: "Metadata Initialization: The metadata is currently initializing. Please wait a moment and try again later.”
|
@ArafatKhan2198 |
devabhishekpal
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added minor check changes to use optional chaining instead
hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/utils/common.tsx
Outdated
Show resolved
Hide resolved
...one/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/diskUsage/diskUsage.tsx
Outdated
Show resolved
Hide resolved
...one/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/diskUsage/diskUsage.tsx
Outdated
Show resolved
Hide resolved
...one/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/diskUsage/diskUsage.tsx
Outdated
Show resolved
Hide resolved
...one/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/diskUsage/diskUsage.tsx
Outdated
Show resolved
Hide resolved
...one/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/diskUsage/diskUsage.tsx
Outdated
Show resolved
Hide resolved
...one/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/diskUsage/diskUsage.tsx
Outdated
Show resolved
Hide resolved
...one/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/diskUsage/diskUsage.tsx
Outdated
Show resolved
Hide resolved
...one/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/diskUsage/diskUsage.tsx
Outdated
Show resolved
Hide resolved
...one/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/diskUsage/diskUsage.tsx
Outdated
Show resolved
Hide resolved
… null response Review Comment for Optional Chain
ArafatKhan2198
left a comment
There was a problem hiding this 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 patch overall the changes look good.
Just a few more minor comments
hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/api/routes.json
Show resolved
Hide resolved
...one/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/diskUsage/diskUsage.tsx
Show resolved
Hide resolved
|
@devabhishekpal Can you please go through your comments and resolve them if they have been fixed in the patch. |
devabhishekpal
left a comment
There was a problem hiding this 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 changes.
Please do take a look at @ArafatKhan2198's comments.
Apart from that it looks good to me, +1
|
@ArafatKhan2198 |
… null response space issue
… null response space issue
|
@smitajoshi12 Most of the changes look good, but I noticed something odd while testing this patch on a cluster. When there is supposed to be no data in the cluster except for a volume named S3V, clicking the "Show Metadata" button should display the NSSummary for the root ("/") path. However, we're encountering an error instead. I'm not sure if this issue was introduced by this patch, but could you please look into it as well?
|
devmadhuu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @smitajoshi12 for improving the patch. Changes LGTM +1. Thanks @ArafatKhan2198 @dombizita @devabhishekpal for review.
@ArafatKhan2198 @devpalabhishek { |
… null response Undefined handled
@ArafatKhan2198 Thanks for pointing out undefined condition. In Latest commit I. have handled both undefined and -1 condition from API response. |
devabhishekpal
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the changes @smitajoshi12.
Thanks for reviewing the change @ArafatKhan2198, @devmadhuu, @dombizita




What changes were proposed in this pull request?
To avoid null conditions on Disk Usage page
Please describe your PR in detail:
When Recon was intializing on Disk Usage page we were getting failures as values are not mapped properly so to avoid such conditions added checks.
API Response :
api/v1/namespace/du?path=/&files=true&sortSubPaths=true
{ "status": "INITIALIZING", "path": null, "size": 0, "sizeWithReplica": -1, "subPathCount": 0, "subPaths": [], "sizeDirectKey": -1 }
api/v1/namespace/summary?path=null
{ "path": "", "type": "UNKNOWN", "countStats": null, "objectInfo": null, "status": "INITIALIZING" }
/api/v1/namespace/quota?path=null
{"allowed":0,"used":0,"status":"INITIALIZING"}
What is the link to the Apache JIRA
(https://issues.apache.org/jira/browse/HDDS-11023)
How was this patch tested?
Manually
Before this PR
With this Patch