You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by za...@apache.org on 2025/01/23 07:40:46 UTC
(hadoop) 26/28: HDFS-17692. [FGL] fix bug in getContentSummary method (#7233)
This is an automated email from the ASF dual-hosted git repository.
zanderxu pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git
commit 16552b6fbdcee507c6f3ebbff41d1bff0c54e79a
Author: ZanderXu <za...@apache.org>
AuthorDate: Wed Dec 25 17:35:16 2024 +0800
HDFS-17692. [FGL] fix bug in getContentSummary method (#7233)
---
.../java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
index 4fe1d99631c..e7b1b7e1d69 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
@@ -3601,12 +3601,12 @@ ContentSummary getContentSummary(final String src) throws IOException {
final FSPermissionChecker pc = getPermissionChecker();
FSPermissionChecker.setOperationType(operationName);
try {
- readLock(RwLockMode.FS);
+ readLock(RwLockMode.GLOBAL);
try {
checkOperation(OperationCategory.READ);
cs = FSDirStatAndListingOp.getContentSummary(dir, pc, src);
} finally {
- readUnlock(RwLockMode.FS, operationName, getLockReportInfoSupplier(src));
+ readUnlock(RwLockMode.GLOBAL, operationName, getLockReportInfoSupplier(src));
}
} catch (AccessControlException ace) {
logAuditEvent(false, operationName, src);
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org