-
Notifications
You must be signed in to change notification settings - Fork 8.9k
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
HDFS-17035. FsVolumeImpl#getActualNonDfsUsed may return negative value. #5708
Conversation
💔 -1 overall
This message was automatically generated. |
The failed unit test was passed in my local. |
@ayushtkn @Hexiaoqiao @zhangshuyan0 . Hi, sir. could you please take a look at this minor issue when you are not busy ? Thanks a lot. |
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.
LGTM. +1 from my side. Let's wait if other folks to feedback util two workdays.
Sir, thanks a lot for your reviewing. |
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.
Why don't we fix getActualNonDfsUsed()
? It should not return -ve, we can do that Math.max there?
Else this problem can be with getRemainingReserved()
and getNonDfsUsed()
?
Sir, thanks a lot for reviewing. Agree with you here, have modified code and run some UT in local. |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
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.
LGTM
Description of PR
Currently, method getActualNonDfsUsed may return negative value, which can cause getRemainingReserved computed inaccurately.
The reason is FsVolumeImpl#getDfsUsed use GetSpaceUsed to compute the usage periodically, not in time.
How was this patch tested?
TestFsVolumeList
TestRoundRobinVolumeChoosingPolicy
TestAvailableSpaceVolumeChoosingPolicy
TestDatanodeReport
TestStorageBlockPoolUsageStdDev