Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HDDS-11640. Deletion services in SCM, OM and DN should have consistent metrics #7426

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

Tejaskriya
Copy link
Contributor

@Tejaskriya Tejaskriya commented Nov 13, 2024

What changes were proposed in this pull request?

Currently, SCM and DN have only total metrics, they don't track the numbers for each iteration of the deleting services. In order to view the progress of deletion using metrics, iteration specific metrics will useful.

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-11640

How was this patch tested?

Tested Manually

@Tejaskriya Tejaskriya marked this pull request as ready for review November 15, 2024 08:54
Comment on lines 234 to 240
public void incrSuccessCountInLastIteration(long successCountInLastIteration) {
this.successCountInLastIteration.incr(successCountInLastIteration);
}

public void incrSuccessBytesInLastIteration(long successBytesInLastIteration) {
this.successBytesInLastIteration.incr(successBytesInLastIteration);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks @Tejaskriya for the patch.

Parameters can be renamed to delta to fix checkstyle failures:

hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/helpers/BlockDeletingServiceMetrics.java
 234: 'successCountInLastIteration' hides a field.
 238: 'successBytesInLastIteration' hides a field.

https://github.com/Tejaskriya/ozone/actions/runs/11813260671/job/32909976492

@@ -127,12 +128,14 @@ public Long getNumBlocksToDelete() {
public BackgroundTaskQueue getTasks() {
BackgroundTaskQueue queue = new BackgroundTaskQueue();

metrics.resetLastIterationCounts();
Copy link
Contributor

Choose a reason for hiding this comment

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

If someone queries the metrics after the resetLastIterationCounts is done and before we populate all the counters again, won't we get inconsistent result?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have changed it now, to store the counter and update the metrics only at the end of each iteration. COuld you please take a look at the update?

@Tejaskriya Tejaskriya marked this pull request as draft November 18, 2024 06:26
@Tejaskriya Tejaskriya marked this pull request as ready for review November 21, 2024 04:08
@Tejaskriya
Copy link
Contributor Author

@errose28 @ashishkumar50 could you please review the PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants