From 7e4572e56a79c508a726fffc04b05c3c0607bb46 Mon Sep 17 00:00:00 2001 From: Kihwal Lee Date: Fri, 16 Oct 2020 11:17:34 -0500 Subject: [PATCH] HDFS-15627. Log delete audits before collecting blocks. (cherry picked from commit 740a2c46353f8005dbed6f5bc15f21acfc4a6a23) --- .../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 a9379984947..259c6a61f17 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 @@ -3111,10 +3111,10 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean, writeUnlock(operationName); } getEditLog().logSync(); + logAuditEvent(true, operationName, src); if (toRemovedBlocks != null) { removeBlocks(toRemovedBlocks); // Incremental deletion of blocks } - logAuditEvent(true, operationName, src); return ret; }