This is an automated email from the ASF dual-hosted git repository. zanderxu pushed a commit to branch HDFS-17384 in repository https://gitbox.apache.org/repos/asf/hadoop.git
commit 43aa4f905ecde0f634115f73776c444aac0e1150 Author: ZanderXu <zande...@apache.org> AuthorDate: Thu Apr 18 09:33:32 2024 +0800 HDFS-17472. [FGL] gcDeletedSnapshot and getDelegationToken support FGL (#6743) --- .../java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 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 db12d646a671..941959e21fac 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 @@ -6337,7 +6337,7 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean, String tokenId = null; Token<DelegationTokenIdentifier> token; checkOperation(OperationCategory.WRITE); - writeLock(); + writeLock(FSNamesystemLockMode.FS); try { checkOperation(OperationCategory.WRITE); checkNameNodeSafeMode("Cannot issue delegation token"); @@ -6365,7 +6365,7 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean, getEditLog().logGetDelegationToken(dtId, expiryTime); tokenId = dtId.toStringStable(); } finally { - writeUnlock(operationName, getLockReportInfoSupplier(tokenId)); + writeUnlock(FSNamesystemLockMode.FS, operationName, getLockReportInfoSupplier(tokenId)); } getEditLog().logSync(); logAuditEvent(true, operationName, tokenId); @@ -7500,7 +7500,7 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean, final INode.BlocksMapUpdateInfo blocksToBeDeleted; checkOperation(OperationCategory.WRITE); - writeLock(); + writeLock(FSNamesystemLockMode.GLOBAL); try { checkOperation(OperationCategory.WRITE); rootPath = Snapshot.getSnapshotPath(snapshotRoot, snapshotName); @@ -7512,7 +7512,7 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean, blocksToBeDeleted = FSDirSnapshotOp.deleteSnapshot( dir, snapshotManager, iip, snapshotName, now, snapshotRoot, false); } finally { - writeUnlock(operationName, getLockReportInfoSupplier(rootPath)); + writeUnlock(FSNamesystemLockMode.GLOBAL, operationName, getLockReportInfoSupplier(rootPath)); } blockManager.addBLocksToMarkedDeleteQueue( blocksToBeDeleted.getToDeleteList()); --------------------------------------------------------------------- To unsubscribe, e-mail: common-commits-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-commits-h...@hadoop.apache.org