xiaoyuyao commented on a change in pull request #2784:
URL: https://github.com/apache/hadoop/pull/2784#discussion_r603641136
##########
File path:
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
##########
@@ -2316,7 +2317,7 @@ boolean truncate(String src, long newLength, String
clientName,
removeBlocks(toRemoveBlocks);
toRemoveBlocks.clear();
}
- logAuditEvent(true, operationName, src, null, r.getFileStatus());
+ logAuditEvent(true, operationName, src, null, status);
Review comment:
I think you can just add a assert(r != null); before return at 2325.
That should be good enough.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]