Skip to content
Merged
Changes from 14 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2223,7 +2223,6 @@ public boolean stop() {
}
if (omRatisServer != null) {
omRatisServer.stop();
omRatisServer = null;
OMHAMetrics.unRegister();
}
isOmRpcServerRunning = false;
Expand Down Expand Up @@ -2260,6 +2259,7 @@ public boolean stop() {
if (omhaMetrics != null) {
OMHAMetrics.unRegister();
}
omRatisServer = null;
return true;
} catch (Exception e) {
LOG.error("OzoneManager stop failed.", e);
Expand Down Expand Up @@ -3031,7 +3031,7 @@ public String getRatisRoles() {
List<ServiceInfo> serviceList;
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"?

try {
leaderId = omRatisServer.getLeader();
if (leaderId == null) {
Expand Down