HDFS-15627. Log delete audits before collecting blocks.

(cherry picked from commit 740a2c46353f8005dbed6f5bc15f21acfc4a6a23)
This commit is contained in:
Kihwal Lee 2020-10-16 11:18:42 -05:00
parent 2667fbd085
commit 9aefc1759b

View File

@ -3052,10 +3052,10 @@ boolean delete(String src, boolean recursive, boolean logRetryCache)
writeUnlock(operationName);
}
getEditLog().logSync();
logAuditEvent(true, operationName, src);
if (toRemovedBlocks != null) {
removeBlocks(toRemovedBlocks); // Incremental deletion of blocks
}
logAuditEvent(true, operationName, src);
return ret;
}