Skip to content

Conversation

@sumitagrawl
Copy link
Contributor

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

int port = omNodeDetails.getRatisPort();
RaftPeer leaderId;
if (isRatisEnabled) {
if (isRatisEnabled && null != omRatisServer) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Else is redundant at the end, also change the string to `Ratis disable or server shutting down"?

Copy link
Contributor

@sadanand48 sadanand48 left a comment

Choose a reason for hiding this comment

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

LGTM

@sadanand48 sadanand48 merged commit 94f539d into apache:master Dec 11, 2023
@sadanand48
Copy link
Contributor

Thanks @sumitagrawl for the change, @kerneltime for the review.

@sodonnel
Copy link
Contributor

This commit has broken compile on master. We either need to revert it or fix it ASAP.

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project ozone-manager: Compilation failure
[ERROR] /Users/sodonnell/source/ozone2/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java:[3038,16] incompatible types: java.lang.String cannot be converted to java.util.List<java.util.List<java.lang.String>>

Probably an overlap with:

HDDS-9303. Display leader in table and highlight current node in OM web UI (#5311

Has caused the issue as the return type was changed there.

@adoroszlai
Copy link
Contributor

Created #5764 to fix the compile error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants