HDDS-9816. NPE for access to MXBean during shutdown of OM#5709
Merged
sadanand48 merged 16 commits intoapache:masterfrom Dec 11, 2023
Merged
HDDS-9816. NPE for access to MXBean during shutdown of OM#5709sadanand48 merged 16 commits intoapache:masterfrom
sadanand48 merged 16 commits intoapache:masterfrom
Conversation
sadanand48
reviewed
Dec 4, 2023
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java
Show resolved
Hide resolved
kerneltime
reviewed
Dec 4, 2023
| int port = omNodeDetails.getRatisPort(); | ||
| RaftPeer leaderId; | ||
| if (isRatisEnabled) { | ||
| if (isRatisEnabled && null != omRatisServer) { |
Contributor
There was a problem hiding this comment.
Else is redundant at the end, also change the string to `Ratis disable or server shutting down"?
Contributor
|
Thanks @sumitagrawl for the change, @kerneltime for the review. |
Contributor
|
This commit has broken compile on master. We either need to revert it or fix it ASAP. Probably an overlap with:
Has caused the issue as the return type was changed there. |
Contributor
|
Created #5764 to fix the compile error. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
while stopping OM, mbean is access to get ratis role, and the omRatisServer is set null after stopping server. As fix, omRatisServer is set at end to avoid if used other place, and added a null check.
This is not have much impact as other failure may happen if ratis server is stopped and accessed. Just avoiding NPE here.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-9816
How was this patch tested?
NA