[
https://issues.apache.org/jira/browse/HDDS-14984?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18071791#comment-18071791
]
Wei-Chiu Chuang commented on HDDS-14984:
----------------------------------------
I just realized om_metrics_num_snapshot_deleted/ numSnapshotDeleted does
exactly this.
So it's not just a counter for number of snapshot delete requests, but the
number of pending deletions.
> [Snapshot] Add a metric for number of in-progress snapshot deletion
> -------------------------------------------------------------------
>
> Key: HDDS-14984
> URL: https://issues.apache.org/jira/browse/HDDS-14984
> Project: Apache Ozone
> Issue Type: Sub-task
> Components: Snapshot
> Reporter: Wei-Chiu Chuang
> Assignee: Wei-Chiu Chuang
> Priority: Major
>
> Add a metric to keep track of in-progress snapshot deletion.
>
> # A snapshot deletion starts when user executes ozone sh snapshot delete,
> which kicks off OMSnapshotDeleteRequest that sets the snapshot status as
> SNAPSHOT_DELETED.
> # A snapshot deletion completes when SnapshotDeletingService reclamation
> finds all keys are reclaimed, which triggers OMSnapshotPurgeRequest that
> removes the snapshot from the persistent snapshotInfoTable.
>
> To build this, we can initialize the number of in-progress snapshot deletion
> in SnapshotChainManager when loadFromSnapshotInfoTable iterates over every
> single snapshot.
> Ahdn then, increment the number when OMSnapshotDeleteRequest updates the
> snapshot status; decrement the number when OMSnapshotPurgeRequest removes the
> snapshot.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]