virajjasani commented on code in PR #6951:
URL: https://github.com/apache/hadoop/pull/6951#discussion_r1685320089
##########
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java:
##########
@@ -8838,6 +8838,10 @@ private Supplier<String>
getLockReportInfoSupplier(String src, String dst,
UserGroupInformation ugi = Server.getRemoteUser();
String userName = ugi != null ? ugi.toString() : null;
InetAddress addr = Server.getRemoteIp();
+ if (addr != null) {
Review Comment:
hmm, FSNamesystemLock#coarseLock (writeLock) is unlocked only after writing
above log so we will incur extra latency for long lock holding thread. Btw, i
think coarseLock writeLock can be unlocked before logging the info as well (by
protecting `longestWriteLockHeldInfo` with either synchronizing or using
another lock), but this is out of scope here so maybe sometime later.
Shall we keep ip address only for long lock hold audit logs (similar to
FSNamesystem audit logs)? If yes, then we can directly make test changes (i.e.
revert TestFSNamesystemLockReport changes done with HDFS-16925)?
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]