zhuxiangyi commented on a change in pull request #2964:
URL: https://github.com/apache/hadoop/pull/2964#discussion_r716528839
##########
File path:
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirRenameOp.java
##########
@@ -417,12 +434,32 @@ static RenameResult unprotectedRenameTo(FSDirectory fsd,
// Ensure dst has quota to accommodate rename
verifyFsLimitsForRename(fsd, srcIIP, dstIIP);
- verifyQuotaForRename(fsd, srcIIP, dstIIP);
+ QuotaCounts srcPolicyCounts = new QuotaCounts.Builder(true).build();
+ QuotaCounts dstPolicyCounts = new QuotaCounts.Builder(true).build();
+ boolean srcIIPIsQuota = FSDirectory.verifyIsQuota(
+ srcIIP, srcIIP.length() - 1);
+ boolean dstIIPIsQuota = FSDirectory.verifyIsQuota(
+ dstIIP, dstIIP.length() - 1);
+ if (srcIIPIsQuota || dstIIPIsQuota) {
+ if (dstParent.getStoragePolicyID() ==
+ srcIIP.getLastINode().getStoragePolicyID()) {
+ srcPolicyCounts = srcIIP.getLastINode().computeQuotaUsage(bsps);
Review comment:
Thanks a lot for your review . I will update it .
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]