From 740a2c46353f8005dbed6f5bc15f21acfc4a6a23 Mon Sep 17 00:00:00 2001 From: Kihwal Lee Date: Fri, 16 Oct 2020 11:13:41 -0500 Subject: [PATCH] HDFS-15627. Log delete audits before collecting blocks. --- .../org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 13ad4c4d7a..19def5c679 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 @@ -3321,10 +3321,10 @@ boolean delete(String src, boolean recursive, boolean logRetryCache) throw e; } getEditLog().logSync(); + logAuditEvent(true, operationName, src); if (toRemovedBlocks != null) { removeBlocks(toRemovedBlocks); // Incremental deletion of blocks } - logAuditEvent(true, operationName, src); return ret; }