ArafatKhan2198 commented on PR #8797:
URL: https://github.com/apache/ozone/pull/8797#issuecomment-3155401056

   Hi @sumitagrawl and @devmadhuu,
   
   I have reverted the changes. We are no longer focusing on the File Bucket 
Distribution for now. We can consider implementing and tracking it later 
through this [HDDS-13539](https://issues.apache.org/jira/browse/HDDS-13539) 
after further discussions. For the time being, please review the current state 
so we can proceed with the implementation.
   
   
   
   
   # Materialized Size/Count Optimization - Event Handling Rules
   Every change must update the immediate parent AND propagate to ALL ancestors 
up to the root. This ensures every directory knows its total size/count 
including all subdirectories.
   
   ## File Addition
   
   **What happens:** New file created
   
   **Action:**
   
   1. Add file size and count to immediate parent directory
   2. Propagate these additions up to ALL ancestor directories
   3. Update file size distribution bucket for immediate parent only
   
   ---
   
   ## File Deletion
   
   **What happens:** File removed
   
   **Action:**
   
   1. Subtract file size and count from immediate parent directory
   2. Propagate these subtractions up to ALL ancestor directories
   3. Update file size distribution bucket for immediate parent only
   
   ---
   
   ## Directory Addition
   
   **What happens:** Directory explicitly created (might already exist with 
content)
   
   **Action:**
   
   1. Set directory name and parent relationship
   2. Add directory to parent's child list
   3. **CRITICAL:** If directory already had files (from earlier file 
operations), propagate those existing totals up to ALL ancestors
   
   ---
   
   ## Directory Deletion
   
   **What happens:** Directory and all contents removed
   
   **Action:**
   
   1. Get the directory's total size and file count (represents everything 
inside it)
   2. Subtract these totals from immediate parent
   3. Propagate these subtractions up to ALL ancestor directories
   4. Remove directory from parent's child list and unlink it


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