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 <[email protected]>
AuthorDate: Wed Sep 20 15:55:20 2023 +0800

    Fix NPE issue when setting system to readonly manually (#11166)
    
    Signed-off-by: OneSizeFitQuorum <[email protected]>
---
 .../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);
       }

Reply via email to