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

   Generated-by: Codex (GPT-5.4)
   
   ## What changes were proposed in this pull request?
   
   This is an optimization. OM orphan snapshot cleanup could start from an 
older queued snapshot before a newer descendant. In linear snapshot chains, 
that caused unnecessary early ancestor checks. The newest descendant could 
still make cleanup complete in the same drain, but older snapshots were 
revisited later in that drain after they became eligible.
   
   - order the initial orphan-cleanup list by snapshot creation time descending 
when snapshot metadata is available
   - keep the existing queue-based ancestor cascade for newly eligible 
snapshots discovered during the drain
   - add debug/info logging
   
   Before this change
   - queued seeds: S2, S3. snapshot created in the same bucket in order of S1 
to S3
   - OM could check S2 first, find nothing removable yet
   - OM then checked S3, which made S2 eligible
   - S2 had to be revisited later in the same drain, or left queued for a later 
run depending on state
   
   After the change
   - initial seeds are ordered newest-first: S3, S2
   - OM checks S3 first and immediately cascades to S2 and then older ancestors 
as they become eligible
   - in a fully purged multiple snapshot chain, all YAMLs are removed in a 
single drain and each snapshot is checked once
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-15428
   
   ## How was this patch tested?
   
   - Added regression coverage
   - Added six-snapshot chain test case to verify the optimization works


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