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

   ## What changes were proposed?
   
   Follow-up to HDDS-16719. `NumSnapshotDeleted` goes up when a snapshot is 
deleted, but nothing brings it down when `SnapshotDeletingService` purges that 
snapshot. On a long-running OM it keeps growing until a restart recounts 
`snapshotInfoTable`.
   
   This PR decrements it in `OMSnapshotPurgeRequest` by the number of 
`SNAPSHOT_DELETED` snapshots actually purged, once the request succeeds. 
Snapshots already gone from the table are skipped, and a failed request leaves 
the metric unchanged.
   
   ## JIRA
   
   https://issues.apache.org/jira/browse/HDDS-16753
   
   ## How was this patch tested?
   
   https://github.com/chihsuan/ozone/actions/runs/38748302479
   
   - `testValidateAndUpdateCache` keeps one active snapshot and checks only 
deleted ones are subtracted.
   - `testDuplicateSnapshotPurge` checks a repeated purge does not decrement 
twice.
   - Added `testNumSnapshotDeletedUnchangedOnPartialPurgeFailure`, which fails 
if the decrement happens inside the loop.
   
   Generated-by: Claude Code (Claude Opus 5.5)
   


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