You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ozone.apache.org by he...@apache.org on 2023/10/25 22:11:24 UTC

[ozone] branch master updated: HDDS-9519. NPE in OM background services during restart (#5474)

This is an automated email from the ASF dual-hosted git repository.

hemant pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git


The following commit(s) were added to refs/heads/master by this push:
     new 79caf16e13 HDDS-9519. NPE in OM background services during restart (#5474)
79caf16e13 is described below

commit 79caf16e13853a6b08f9248b0ef2e304846f2ce7
Author: Doroszlai, Attila <64...@users.noreply.github.com>
AuthorDate: Thu Oct 26 00:11:18 2023 +0200

    HDDS-9519. NPE in OM background services during restart (#5474)
---
 .../src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java        | 4 +++-
 .../org/apache/hadoop/ozone/om/service/DirectoryDeletingService.java  | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java
index 60ccbfbdf8..26ef8cdd33 100644
--- a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java
+++ b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java
@@ -4066,8 +4066,10 @@ public final class OzoneManager extends ServiceRuntimeInfoImpl
    * If ratis is not enabled, then it always returns true.
    */
   public boolean isLeaderReady() {
+    final OzoneManagerRatisServer ratisServer = omRatisServer;
     return !isRatisEnabled
-        || omRatisServer.checkLeaderStatus() == LEADER_AND_READY;
+        || (ratisServer != null &&
+            ratisServer.checkLeaderStatus() == LEADER_AND_READY);
   }
 
   /**
diff --git a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/service/DirectoryDeletingService.java b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/service/DirectoryDeletingService.java
index 71f352588d..9643fa8296 100644
--- a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/service/DirectoryDeletingService.java
+++ b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/service/DirectoryDeletingService.java
@@ -88,7 +88,7 @@ public class DirectoryDeletingService extends AbstractKeyDeletingService {
   public DirectoryDeletingService(long interval, TimeUnit unit,
       long serviceTimeout, OzoneManager ozoneManager,
       OzoneConfiguration configuration) {
-    super(KeyDeletingService.class.getSimpleName(), interval, unit,
+    super(DirectoryDeletingService.class.getSimpleName(), interval, unit,
         DIR_DELETING_CORE_POOL_SIZE, serviceTimeout, ozoneManager, null);
     this.pathLimitPerTask = configuration
         .getInt(OZONE_PATH_DELETING_LIMIT_PER_TASK,


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@ozone.apache.org
For additional commands, e-mail: commits-help@ozone.apache.org