Skip to content

should not create space if the host doesn't send heartbeat. #3578

Closed
@HarrisChu

Description

@HarrisChu

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
  1. offline storage cannot be a valid engine.
  2. storage doesn't send heartbeat should not be a valid engine.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

type/bugType: something is unexpected

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions