chiraggoyal19 opened a new pull request, #9389:
URL: https://github.com/apache/ozone/pull/9389

   
   ## What changes were proposed in this pull request?
   This PR refactors handlePutDirEvent and handleDeleteDirEvent to follow the 
same pattern as key event handlers, establishing uniform stat update logic 
across all event handlers.
   
   **Current inconsistency**:
   Key handlers update immediate parent stats directly, then propagate to 
grandparents
   Directory handlers rely on propagateSizeUpwards for all updates including 
immediate parent
   
   **Changes**:
   
   **handlePutDirEvent**: Added direct stat updates to immediate parent when 
directory has existing content, then propagate to grandparents via 
propagateSizeUpwards(parentObjectId)
   
   **handleDeleteDirEvent**: Added direct stat decrements to immediate parent 
when deleting directory with content, then propagate to grandparents via 
propagateSizeUpwards(parentObjectId)
   
   **Result**: All four event handlers now follow the same pattern: update 
immediate parent directly, use propagateSizeUpwards for ancestors.
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-14014
   
   ## How was this patch tested?
   Existing unit tests in TestNSSummaryEndpointWithLegacy and 
TestNSSummaryEndpointWithFSO
   Tests verify correct namespace summary calculations after refactoring
   


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