From 59de31e4529e91b954b74783c44db18859252de1 Mon Sep 17 00:00:00 2001 From: "zengqiang.xu" Date: Wed, 18 Dec 2024 16:28:51 +0800 Subject: [PATCH] HDFS-17692. [FGL] fix bug in getContentSummary method --- .../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 4fe1d99631c64..e7b1b7e1d6957 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);