-
Notifications
You must be signed in to change notification settings - Fork 594
HDDS-7923. [EC] Reconstruction is failing with IndexOutOfBoundsException #4258
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
Conversation
kaijchen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks @umamaheswararao. Please fix the style issue in CI.
| } | ||
|
|
||
| @Test | ||
| void testECReconstructionWithPartialStripe() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @umamaheswararao, the fix looks good.
However, seems the test here is not covering the bug.
Could you please take another look?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is failing when I run this test. Interestingly I noticed that, when I run the tests together with testECReconstructionCoordinatorWithMissingIndexes135, it passes. Can you try running this test alone?
Confirmed. Maybe there is interference among the tests here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I figured out the problem. Test indeed tests the behavior, however because of using the inputchunks array which was might created by other tests, number of bytes written to file was more than one chunk. So, it's not meeting the expected situation when ran with other tests. If you run this test alone, it will consistently fail as input chunk initialization will happen as expected, that is just 1 chunk. I will update the patch shortly.
|
Merged, thanks @umamaheswararao and @adoroszlai. |

What changes were proposed in this pull request?
Handled the case when chunk list null, but getChunks internal method returning empty list. In this case, we have made wrong assumption and access array elements. This fixed the issue and added the necessary checks.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-7923
How was this patch tested?
Added the test.