Skip to content

HDDS-10063. NumKeys metric not decremented on FSO directory delete.#5933

Merged
adoroszlai merged 4 commits intoapache:masterfrom
errose28:HDDS-10063-key-count-metrics
Jan 8, 2024
Merged

HDDS-10063. NumKeys metric not decremented on FSO directory delete.#5933
adoroszlai merged 4 commits intoapache:masterfrom
errose28:HDDS-10063-key-count-metrics

Conversation

@errose28
Copy link
Contributor

@errose28 errose28 commented Jan 6, 2024

What changes were proposed in this pull request?

Directory and file count is included in the OM NumKeys metric. When a directory is deleted from OM, its subdirectories and files are not subtracted from the current key count held by the NumKeys metric. We can decrement this metric in the OMDirectoriesPurgeRequestWithFSO sent out by the leader's directory deleting service so that the metric is updated asynchronously on the leader and all followers.

What is the link to the Apache JIRA

HDDS-10063

How was this patch tested?

New integration test for directory related metrics added to the existing test class for OM Metrics.

@errose28 errose28 requested a review from dombizita January 6, 2024 00:53
Copy link
Contributor

@dombizita dombizita left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this and adding proper testing for the directory operations related OM metrics @errose28! LGTM

@adoroszlai adoroszlai merged commit 7a2bd38 into apache:master Jan 8, 2024
@adoroszlai
Copy link
Contributor

Thanks @errose28 for the patch, @dombizita for the review.

swamirishi pushed a commit to swamirishi/ozone that referenced this pull request Jun 10, 2024
…ry delete. (apache#5933)

(cherry picked from commit 7a2bd38)

Conflicts: hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOmMetrics.java

This change also migrates TestOmMetrics to Junit5 using changes from HDDS-9775 for that class only.

Change-Id: I9edf0d493431deb1df66fd7f023633ebcd48e208
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments