You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@iotdb.apache.org by "xiaozhihong (Jira)" <ji...@apache.org> on 2023/05/16 08:36:00 UTC

[jira] [Created] (IOTDB-5886) The DataNode is readONLY, and should not be elected as leader

xiaozhihong created IOTDB-5886:
----------------------------------

             Summary: The DataNode is readONLY, and should not be elected as leader
                 Key: IOTDB-5886
                 URL: https://issues.apache.org/jira/browse/IOTDB-5886
             Project: Apache IoTDB
          Issue Type: Bug
          Components: mpp-cluster
    Affects Versions: master branch
            Reporter: xiaozhihong
            Assignee: Yongzao Dan
         Attachments: image-2023-05-16-16-34-56-835.png, iotdb-common.properties, iotdb-confignode.properties, iotdb-datanode.properties

Branch : master 

commit dd86d1aca25640d00063836883b4129b966ce7ca

Referring to the configuration file, on 3 servers, start 3C3D.
Use Benchmark to write data to them, when one of the nodes is readONLY, stop writing, when entering CLI query, show data region, readONLY node shows as leader now.
{code:java}
IoTDB> show cluster details;
+------+----------+------------------+---------------+------------+-------------------+------------+-------+-------+-------------------+-----------------+
|NodeID|  NodeType|            Status|InternalAddress|InternalPort|ConfigConsensusPort|  RpcAddress|RpcPort|MppPort|SchemaConsensusPort|DataConsensusPort|
+------+----------+------------------+---------------+------------+-------------------+------------+-------+-------+-------------------+-----------------+
|     0|ConfigNode|           Running|    172.20.31.2|       10710|              10720|            |       |       |                   |                 |
|     2|ConfigNode|           Running|    172.20.31.3|       10710|              10720|            |       |       |                   |                 |
|     4|ConfigNode|           Running|   172.20.31.63|       10710|              10720|            |       |       |                   |                 |
|     1|  DataNode|ReadOnly(DiskFull)|    172.20.31.2|       10730|                   | 172.20.31.2|   6667|  10740|              10750|            10760|
|     3|  DataNode|ReadOnly(DiskFull)|    172.20.31.3|       10730|                   | 172.20.31.3|   6667|  10740|              10750|            10760|
|     5|  DataNode|           Running|   172.20.31.63|       10730|                   |172.20.31.63|   6667|  10740|              10750|            10760|
+------+----------+------------------+---------------+------------+-------------------+------------+-------+-------+-------------------+-----------------+
Total line number = 6
It costs 0.382s
IoTDB> show regions;
+--------+------------+--------+-------------+-------------+-----------+----------+------------+-------+--------+-----------------------+
|RegionId|        Type|  Status|     Database|SeriesSlotNum|TimeSlotNum|DataNodeId|  RpcAddress|RpcPort|    Role|             CreateTime|
+--------+------------+--------+-------------+-------------+-----------+----------+------------+-------+--------+-----------------------+
|       0|SchemaRegion|ReadOnly|root.test.g_0|           10|          0|         1| 172.20.31.2|   6667|  Leader|2023-05-16T15:30:30.694|
|       0|SchemaRegion|ReadOnly|root.test.g_0|           10|          0|         3| 172.20.31.3|   6667|Follower|2023-05-16T15:30:30.694|
|       0|SchemaRegion| Running|root.test.g_0|           10|          0|         5|172.20.31.63|   6667|Follower|2023-05-16T15:30:30.694|
|       1|  DataRegion|ReadOnly|root.test.g_0|            5|         85|         1| 172.20.31.2|   6667|Follower|2023-05-16T15:30:34.452|
|       1|  DataRegion|ReadOnly|root.test.g_0|            5|         85|         3| 172.20.31.3|   6667|Follower|2023-05-16T15:30:34.452|
|       1|  DataRegion| Running|root.test.g_0|            5|         85|         5|172.20.31.63|   6667|  Leader|2023-05-16T15:30:34.452|
|       2|  DataRegion|ReadOnly|root.test.g_0|            5|         85|         1| 172.20.31.2|   6667|  Leader|2023-05-16T15:30:36.973|
|       2|  DataRegion|ReadOnly|root.test.g_0|            5|         85|         3| 172.20.31.3|   6667|Follower|2023-05-16T15:30:36.973|
|       2|  DataRegion| Running|root.test.g_0|            5|         85|         5|172.20.31.63|   6667|Follower|2023-05-16T15:30:36.973|
+--------+------------+--------+-------------+-------------+-----------+----------+------------+-------+--------+-----------------------+
Total line number = 9
It costs 0.079s
IoTDB> show schema regions;
+--------+------------+--------+-------------+-------------+-----------+----------+------------+-------+--------+-----------------------+
|RegionId|        Type|  Status|     Database|SeriesSlotNum|TimeSlotNum|DataNodeId|  RpcAddress|RpcPort|    Role|             CreateTime|
+--------+------------+--------+-------------+-------------+-----------+----------+------------+-------+--------+-----------------------+
|       0|SchemaRegion|ReadOnly|root.test.g_0|           10|          0|         1| 172.20.31.2|   6667|  Leader|2023-05-16T15:30:30.694|
|       0|SchemaRegion|ReadOnly|root.test.g_0|           10|          0|         3| 172.20.31.3|   6667|Follower|2023-05-16T15:30:30.694|
|       0|SchemaRegion| Running|root.test.g_0|           10|          0|         5|172.20.31.63|   6667|Follower|2023-05-16T15:30:30.694|
+--------+------------+--------+-------------+-------------+-----------+----------+------------+-------+--------+-----------------------+
Total line number = 3
It costs 0.006s
IoTDB> show data regions;
+--------+----------+--------+-------------+-------------+-----------+----------+------------+-------+--------+-----------------------+
|RegionId|      Type|  Status|     Database|SeriesSlotNum|TimeSlotNum|DataNodeId|  RpcAddress|RpcPort|    Role|             CreateTime|
+--------+----------+--------+-------------+-------------+-----------+----------+------------+-------+--------+-----------------------+
|       1|DataRegion|ReadOnly|root.test.g_0|            5|         85|         1| 172.20.31.2|   6667|Follower|2023-05-16T15:30:34.452|
|       1|DataRegion|ReadOnly|root.test.g_0|            5|         85|         3| 172.20.31.3|   6667|Follower|2023-05-16T15:30:34.452|
|       1|DataRegion| Running|root.test.g_0|            5|         85|         5|172.20.31.63|   6667|  Leader|2023-05-16T15:30:34.452|
|       2|DataRegion|ReadOnly|root.test.g_0|            5|         85|         1| 172.20.31.2|   6667|  Leader|2023-05-16T15:30:36.973|
|       2|DataRegion|ReadOnly|root.test.g_0|            5|         85|         3| 172.20.31.3|   6667|Follower|2023-05-16T15:30:36.973|
|       2|DataRegion| Running|root.test.g_0|            5|         85|         5|172.20.31.63|   6667|Follower|2023-05-16T15:30:36.973|
+--------+----------+--------+-------------+-------------+-----------+----------+------------+-------+--------+-----------------------+
Total line number = 6
It costs 0.015s
 {code}
!image-2023-05-16-16-34-56-835.png|width=539,height=344!



--
This message was sent by Atlassian Jira
(v8.20.10#820010)