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-10681. EC Reconstruction does not issue put block to data index if it is unused #6514

Merged
merged 2 commits into from
Apr 12, 2024

Conversation

sodonnel
Copy link
Contributor

What changes were proposed in this pull request?

Given a small EC block:

  • <= 2MB for EC-3-2
  • <= 5MB for EC-6-3
  • <= 9MB for EC-10-4

So that it is less than a full stripe and does not use all the datanodes.

When reconstruction happens to replace a replica which is not used in the stripe, the unused containers are not issued with the put block to store the details of the empty block within the container. Note that the container replica will likely have other blocks, so it will still get reconstructed, but it will not be given a reference to this empty block.

All containers are checked for the presence of all blocks during reconstruction. If any of the containers do not have a reference to the block, it is considered an orphan block / abandoned stripe and will not be reconstructed.

Therefore if one replica has no entry for the block, then it is used it another reconstruction for another replica later, that block will not get reconstructed into a second replica. Over time this can result in the reference getting removed from all copies.

What is the link to the Apache JIRA

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

How was this patch tested?

Reproduced the issue using a new unit test, and then fixed the code to make the test pass.

Copy link
Contributor

@adoroszlai adoroszlai left a comment

Choose a reason for hiding this comment

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

Thanks @sodonnel for the patch, LGTM.

Comment on lines 624 to 628
@Test
void testECReconstructionWithPartialStripe()
void testECReconstructParityWithPartialStripe()
throws Exception {
testECReconstructionCoordinator(ImmutableList.of(4, 5), 1);
}
Copy link
Contributor

@adoroszlai adoroszlai Apr 12, 2024

Choose a reason for hiding this comment

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

nit: this can be removed, since recoverableMissingIndexes includes (4, 5), so testECReconstructionCoordinatorWithPartialStripe covers the same case.

It's OK to do it in #6515, so this can be merged as is.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point. I will fix this when I rebase #6515

@sodonnel
Copy link
Contributor Author

Thanks for the review @adoroszlai - merging this to master.

@sodonnel sodonnel merged commit cba8c85 into apache:master Apr 12, 2024
38 checks passed
@adoroszlai adoroszlai added the EC label Apr 12, 2024
Tejaskriya pushed a commit to Tejaskriya/ozone that referenced this pull request Apr 17, 2024
sodonnel added a commit to sodonnel/hadoop-ozone that referenced this pull request Apr 17, 2024
…if it is unused (apache#6514)

(cherry picked from commit cba8c85)

 Conflicts:
	hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/hdds/scm/storage/TestContainerCommandsEC.java
xichen01 pushed a commit to xichen01/ozone that referenced this pull request Apr 17, 2024
xichen01 pushed a commit to xichen01/ozone that referenced this pull request Apr 18, 2024
xichen01 pushed a commit to xichen01/ozone that referenced this pull request Apr 18, 2024
sodonnel added a commit to sodonnel/hadoop-ozone that referenced this pull request Apr 18, 2024
…if it is unused (apache#6514)

(cherry picked from commit cba8c85)

 Conflicts:
	hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/hdds/scm/storage/TestContainerCommandsEC.java
jojochuang pushed a commit to jojochuang/ozone that referenced this pull request May 29, 2024
swamirishi pushed a commit to swamirishi/ozone that referenced this pull request Jun 10, 2024
… data index if it is unused (apache#6514)

(cherry picked from commit cba8c85)
Change-Id: I45c8c731e7179272d14bde666cea18b5b99dfb7c
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.

2 participants