Closed
Description
as we can add some host that is not launched, when create space, we should verify if the hosts sent heartbeat.
otherwise the partitions would be in a wrong host.
# invalid host
(root@nebula) [(none)]> add hosts 192.168.8.66:9779
Execution succeeded (time spent 17185/20540 us)
(root@nebula) [(none)]> show zones
+----------------------------------+----------------+------+
| Name | Host | Port |
+----------------------------------+----------------+------+
| "default_zone_192.168.8.63_9779" | "192.168.8.63" | 9779 |
| "default_zone_192.168.8.66_9779" | "192.168.8.66" | 9779 |
+----------------------------------+----------------+------+
Got 2 rows (time spent 1326/5641 us)
(root@nebula) [(none)]> show hosts
+----------------+------+-----------+--------------+----------------------+------------------------+
| Host | Port | Status | Leader count | Leader distribution | Partition distribution |
+----------------+------+-----------+--------------+----------------------+------------------------+
| "192.168.8.63" | 9779 | "OFFLINE" | 0 | "No valid partition" | "s1:100" |
| "Total" | | | 0 | | "s1:100" |
+----------------+------+-----------+--------------+----------------------+------------------------+
Got 2 rows (time spent 1460/10235 us)
(root@nebula) [(none)]> create space s2(vid_type=int, replica_factor=2)
Execution succeeded (time spent 22659/27157 us)
Tue, 28 Dec 2021 16:01:47 CST
- offline storage cannot be a valid engine.
- storage doesn't send heartbeat should not be a valid engine.
Activity