[
https://issues.apache.org/jira/browse/HDFS-4995?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13821826#comment-13821826
]
Daryn Sharp commented on HDFS-4995:
-----------------------------------
Looks much cleaner. One question:
{{code}}
+ // Snapshot summary calc won't be relinquishing locks in the middle.
+ // Do this first and handover to parent.
+ computeContentSummary4Snapshot(summary.getCounts());
+ super.computeContentSummary(summary);
{{code}}
Is switching the order of the calls completely safe? Is there any chance you
can fall through an inode reference to a directory that will yield?
> Make getContentSummary() less expensive
> ---------------------------------------
>
> Key: HDFS-4995
> URL: https://issues.apache.org/jira/browse/HDFS-4995
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: namenode
> Affects Versions: 0.23.9, 2.3.0
> Reporter: Kihwal Lee
> Assignee: Kihwal Lee
> Attachments: HDFS-4995.branch-0.23.3.patch, HDFS-4995.trunk.2.patch,
> HDFS-4995.trunk.3.patch, HDFS-4995.trunk.patch, HDFS-4995.trunk1.patch
>
>
> When users call du or count DFS command, getContentSummary() method is called
> against namenode. If the directory has many directories and files, it could
> hold the namesystem lock for a long time. We've seen it taking over 20
> seconds. Namenode should not allow regular users to cause extended locking.
--
This message was sent by Atlassian JIRA
(v6.1#6144)