HDDS-15103. OM termination due to race condition between om start and install snapshot#10118
Conversation
adoroszlai
left a comment
There was a problem hiding this comment.
Thanks @ChenSammi for the patch. The fix looks good, but I don't think the test case is useful or needed. It basically tests (1) behavior with the test-specific flag and (2) normal operation in running state, which is also exercised by other test cases. It does not actually test the real scenario, where OM is not yet running. I understand that testing this for real would require more complex instrumentation, and am not asking for such a test. But I think the current test is unnecessary (both code and execution time) and may even be flaky.
@adoroszlai , the unit test is mainly to test that OM can continue and finish the snapshot installation in case it returns "null" for the first a few installSnapshot requests. I want to make sure the new change will not fail the snapshot installation completely. Or maybe I can add the case into an existing unit test, so it will not introduce new execution time. |
adoroszlai
left a comment
There was a problem hiding this comment.
Thanks @ChenSammi for updating the patch.
| cluster.startInactiveOM(followerNodeId); | ||
| OzoneManager.setTestInstallSnapshot(true); |
There was a problem hiding this comment.
I think there may be a race condition here, but we can fix it later (by swapping these two statements) if it turns out to be flaky.
|
Thanks @adoroszlai @sadanand48 for the review. |
What changes were proposed in this pull request?
fix the race condition problem between om start and install snapshot
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-15103
How was this patch tested?
new unit test