Description
This is a follow up based on comment from jingzhao on HDFS-7723.
I just noticed that INodeFile#computeQuotaUsage calls getStoragePolicyID to identify the storage policy id of the file. This may not be very efficient (especially when we're computing the quota usage of a directory) because getStoragePolicyID may recursively check the ancestral INode's storage policy. I think here an improvement can be passing the lowest parent directory's storage policy down while traversing the tree.
Attachments
Attachments
Issue Links
- is related to
-
HDFS-11254 Standby NameNode may crash during failover if loading edits takes too long
- Resolved
-
HDFS-8029 NPE during disk usage calculation on snapshot directory, after a sub folder is deleted
- Resolved