You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ha...@apache.org on 2023/09/20 07:55:30 UTC

[iotdb] branch master updated: Fix NPE issue when setting system to readonly manually (#11166)

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

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


The following commit(s) were added to refs/heads/master by this push:
     new d654e03c869 Fix NPE issue when setting system to readonly manually (#11166)
d654e03c869 is described below

commit d654e03c869e6de81dca2ebf3c4dbf5a7d7a503a
Author: Potato <ta...@apache.org>
AuthorDate: Wed Sep 20 15:55:20 2023 +0800

    Fix NPE issue when setting system to readonly manually (#11166)
    
    Signed-off-by: OneSizeFitQuorum <ta...@apache.org>
---
 .../iotdb/db/protocol/thrift/impl/DataNodeInternalRPCServiceImpl.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/thrift/impl/DataNodeInternalRPCServiceImpl.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/thrift/impl/DataNodeInternalRPCServiceImpl.java
index 8d8d5c07093..2c777218dbf 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/thrift/impl/DataNodeInternalRPCServiceImpl.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/thrift/impl/DataNodeInternalRPCServiceImpl.java
@@ -1303,8 +1303,8 @@ public class DataNodeInternalRPCServiceImpl implements IDataNodeRPCService.Iface
             commonConfig.getDiskSpaceWarningThreshold());
         commonConfig.setNodeStatus(NodeStatus.ReadOnly);
         commonConfig.setStatusReason(NodeStatus.DISK_FULL);
-      } else if (commonConfig.getNodeStatus().equals(NodeStatus.ReadOnly)
-          && commonConfig.getStatusReason().equals(NodeStatus.DISK_FULL)) {
+      } else if (NodeStatus.ReadOnly.equals(commonConfig.getNodeStatus())
+          && NodeStatus.DISK_FULL.equals(commonConfig.getStatusReason())) {
         commonConfig.setNodeStatus(NodeStatus.Running);
         commonConfig.setStatusReason(null);
       }