-
Notifications
You must be signed in to change notification settings - Fork 588
HDDS-10061. NPE when container is loaded with missing container DB #5921
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
errose28
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.
Thanks for fixing this @sumitagrawl. Change LGTM but can you add a test as well to make sure that invalid containers missing a container file or DB are not loaded into the datanode on startup?
| "Skipping loading of this container.", containerID); | ||
| // Don't further process this container, as it is missing db file. | ||
| return; | ||
| throw new IOException("Container DB file is missing"); |
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.
Include the container ID in the exception.
errose28
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.
Thanks for the updates @sumitagrawl LGTM just one minor comment.
...r-service/src/test/java/org/apache/hadoop/ozone/container/ozoneimpl/TestContainerReader.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Ethan Rose <[email protected]>
errose28
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.
Thanks @adoroszlai LGTM once CI passes.
|
Thanks @sumitagrawl for the patch, @errose28, @kerneltime for the review. |
…pache#5921) (cherry picked from commit 702a385)
…tainer DB (apache#5921) Change-Id: If44641fac4b202e8ada1bf1012f3e4087d8fa7cd
What changes were proposed in this pull request?
when container db is not available, throw IOException so that its not loaded to memory. Log also represent for not loading the container but seems not handled properly.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-10061
How was this patch tested?