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-10370. Recon - Handle the pre-existing missing empty containers in clusters. #6255

Merged
merged 4 commits into from
Feb 28, 2024

Conversation

devmadhuu
Copy link
Contributor

What changes were proposed in this pull request?

This PR addresses the corner case when a Recon has earlier identified some MISSING (UNHEALTHY) containers, but they all were EMPTY (No keys mapped), so Recon should filter out such existing MISSING (UNHEALTHY) containers.

In a running cluster, Recon may have identified some MISSING (UNHEALTHY) containers before the HDDS-9695 was applied. After the fix is applied, in a running cluster, existing MISSING (UNHEALTHY) containers which were actually EMPTY were still shown as MISSING, so this PR change is to filter out such existing MISSING (UNHEALTHY) containers which were actually EMPTY.

What is the link to the Apache JIRA

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

How was this patch tested?

Existing Junit integration test org.apache.hadoop.ozone.recon.TestReconTasks#testEmptyMissingContainerDownNode was updated and tested.

@devmadhuu
Copy link
Contributor Author

@sumitagrawl @dombizita @fapifta , pls review.

@devmadhuu devmadhuu marked this pull request as ready for review February 22, 2024 14:52
@devmadhuu
Copy link
Contributor Author

Working on fixing TestContainerHealthTask test case failure.

@devmadhuu devmadhuu marked this pull request as draft February 22, 2024 15:20
@devmadhuu devmadhuu marked this pull request as ready for review February 23, 2024 14:23
@devmadhuu
Copy link
Contributor Author

Working on fixing TestContainerHealthTask test case failure.

This is fixed.

@devmadhuu devmadhuu requested a review from sodonnel February 26, 2024 08:58
@@ -113,6 +118,10 @@ public Cursor<UnhealthyContainersRecord> getAllUnhealthyRecordsCursor() {
}

public void insertUnhealthyContainerRecords(List<UnhealthyContainers> recs) {
recs.forEach(rec -> {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we wrap this in a "if debug enabled" statement? Normally I am against doing that for a single debug statement, as it is handled inside the logger, but in this case we will have to iterate all the records and it is pssible there are a lot of them, so it might be worth wrapping the entire forEach so avoid that expense if it is not needed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, good suggestion @sodonnel . I have handled it.

@@ -110,38 +112,86 @@ public void testRun() throws Exception {
when(scmClientMock.getContainerWithPipeline(c.getContainerID()))
.thenReturn(new ContainerWithPipeline(c, null));
}

ReplicatedReplicationConfig replicationConfig = new ReplicatedReplicationConfig() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need all this? Can we not just do:

ReplicatedReplicationConfig replicationConfig = RatisReplicationConfig.getInstance(THREE);

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do we need all this? Can we not just do:

ReplicatedReplicationConfig replicationConfig = RatisReplicationConfig.getInstance(THREE);

Yes, its not needed. I added earlier due to a error. Now simplified. Thanks.

Copy link
Contributor

@sumitagrawl sumitagrawl left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@sodonnel sodonnel left a comment

Choose a reason for hiding this comment

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

LGTM

@sumitagrawl sumitagrawl merged commit e0bf7b4 into apache:master Feb 28, 2024
35 checks passed
jojochuang pushed a commit to jojochuang/ozone that referenced this pull request Mar 15, 2024
…in clusters. (apache#6255)

(cherry picked from commit e0bf7b4)
Change-Id: I72150151e39f2bfc29d9f39673782c1afd5353ad
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