Pārlūkot izejas kodu

HDFS-15627. Log delete audits before collecting blocks.

(cherry picked from commit 740a2c46353f8005dbed6f5bc15f21acfc4a6a23)
Kihwal Lee 4 gadi atpakaļ
vecāks
revīzija
433434d509

+ 1 - 1
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java

@@ -3254,10 +3254,10 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
       throw e;
     }
     getEditLog().logSync();
+    logAuditEvent(true, operationName, src);
     if (toRemovedBlocks != null) {
       removeBlocks(toRemovedBlocks); // Incremental deletion of blocks
     }
-    logAuditEvent(true, operationName, src);
     return ret;
   }