CapMoon opened a new pull request, #8360:
URL: https://github.com/apache/hadoop/pull/8360

   <!--
     Thanks for sending a pull request!
       1. If this is your first time, please read our contributor guidelines: 
https://cwiki.apache.org/confluence/display/HADOOP/How+To+Contribute
       2. Make sure your PR title starts with JIRA issue id, e.g., 
'HADOOP-17799. Your PR title ...'.
   -->
   
   ### Description of PR
   The logAllocatedBlock method in FSNamesystem.getAdditionalBlock is currently 
called while holding global lock. Flame graph analysis shows this logging path 
(via SLF4J/Log4j appenders) contributes non-trivial latency, blocking other 
NameNode operations.
    
   Since logAllocatedBlock is only for audit/diagnostic logging and does not 
modify shared state, we can safely move it after releasing global lock to 
reduce lock hold time and improve write throughput.
    
   This change preserves all existing logging behavior while eliminating 
unnecessary lock contention from I/O-bound logging operations.
   
   ### How was this patch tested?
   N/A


-- 
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]

Reply via email to