Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

more validation when create space in a empty zone #3022

Closed
HarrisChu opened this issue Oct 9, 2021 · 3 comments · Fixed by #3065
Closed

more validation when create space in a empty zone #3022

HarrisChu opened this issue Oct 9, 2021 · 3 comments · Fixed by #3065
Assignees
Labels
type/bug Type: something is unexpected
Milestone

Comments

@HarrisChu
Copy link
Contributor

  1. a group with 3 zones, z1,z2,z3, z1 has no hosts.
  2. create a 3 replica space on the group

expect result:

  1. could not create space.

actual:

  1. create successfully.
  2. partition peers are not correctly.
(root@nebula) [(none)]> add zone z1 "svkhpd-storaged-0.svkhpd-storaged-headless.default.svc.cluster.local":9779
Execution succeeded (time spent 941/1787 us)

Sat, 09 Oct 2021 05:32:50 UTC

(root@nebula) [(none)]> add zone z2 "svkhpd-storaged-1.svkhpd-storaged-headless.default.svc.cluster.local":9779
Execution succeeded (time spent 929/1725 us)

Sat, 09 Oct 2021 05:32:59 UTC

(root@nebula) [(none)]> add zone z3 "svkhpd-storaged-2.svkhpd-storaged-headless.default.svc.cluster.local":9779
Execution succeeded (time spent 858/1194 us)

Sat, 09 Oct 2021 05:33:03 UTC

(root@nebula) [(none)]> drop host "svkhpd-storaged-0.svkhpd-storaged-headless.default.svc.cluster.local":9779 from zone z1
Execution succeeded (time spent 823/1641 us)

Sat, 09 Oct 2021 05:33:18 UTC

(root@nebula) [(none)]> add group g1 z1,z2,z3
Execution succeeded (time spent 754/1634 us)

Sat, 09 Oct 2021 05:33:26 UTC

(root@nebula) [(none)]> create space s1 (vid_type=int, replica_factor=3, partition_num=4) on g1
Execution succeeded (time spent 997/1689 us)

Sat, 09 Oct 2021 05:33:39 UTC
(root@nebula) [s1]> show zones
+------+------------------------------------------------------------------------+------+
| Name | Host                                                                   | Port |
+------+------------------------------------------------------------------------+------+
| "z1" | ""                                                                     | 0    |
+------+------------------------------------------------------------------------+------+
| "z2" | "svkhpd-storaged-1.svkhpd-storaged-headless.default.svc.cluster.local" | 9779 |
+------+------------------------------------------------------------------------+------+
| "z3" | "svkhpd-storaged-2.svkhpd-storaged-headless.default.svc.cluster.local" | 9779 |
+------+------------------------------------------------------------------------+------+
Got 3 rows (time spent 791/1783 us)
(root@nebula) [s1]> show parts
+--------------+-----------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+-------+
| Partition ID | Leader                                                                      | Peers                                                                                                                                                  | Losts |
+--------------+-----------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+-------+
| 1            | "svkhpd-storaged-2.svkhpd-storaged-headless.default.svc.cluster.local:9779" | "svkhpd-storaged-2.svkhpd-storaged-headless.default.svc.cluster.local:9779, svkhpd-storaged-1.svkhpd-storaged-headless.default.svc.cluster.local:9779" | ""    |
+--------------+-----------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+-------+
| 2            | "svkhpd-storaged-2.svkhpd-storaged-headless.default.svc.cluster.local:9779" | "svkhpd-storaged-2.svkhpd-storaged-headless.default.svc.cluster.local:9779, svkhpd-storaged-1.svkhpd-storaged-headless.default.svc.cluster.local:9779" | ""    |
+--------------+-----------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+-------+
| 3            | "svkhpd-storaged-2.svkhpd-storaged-headless.default.svc.cluster.local:9779" | "svkhpd-storaged-2.svkhpd-storaged-headless.default.svc.cluster.local:9779, svkhpd-storaged-1.svkhpd-storaged-headless.default.svc.cluster.local:9779" | ""    |
+--------------+-----------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+-------+
| 4            | "svkhpd-storaged-1.svkhpd-storaged-headless.default.svc.cluster.local:9779" | "svkhpd-storaged-2.svkhpd-storaged-headless.default.svc.cluster.local:9779, svkhpd-storaged-1.svkhpd-storaged-headless.default.svc.cluster.local:9779" | ""    |
+--------------+-----------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+-------+
@HarrisChu HarrisChu added the type/bug Type: something is unexpected label Oct 9, 2021
@Sophie-Xie Sophie-Xie added this to the v2.6.0 milestone Oct 9, 2021
@darionyaphet
Copy link
Contributor

#2967 this pr have fix it ?

@HarrisChu
Copy link
Contributor Author

no, this issue is
peerhost is not empty, but don't meet replica

(root@nebula) [s2]> show hosts graph
+---------------------------------------------------------------+------+----------+---------+--------------+---------+
| Host                                                          | Port | Status   | Role    | Git Info Sha | Version |
+---------------------------------------------------------------+------+----------+---------+--------------+---------+
| "svkhpd-graphd-0.svkhpd-graphd-svc.default.svc.cluster.local" | 9669 | "ONLINE" | "GRAPH" | "e642c05"    |         |
+---------------------------------------------------------------+------+----------+---------+--------------+---------+

2.6.0 branch

@HarrisChu
Copy link
Contributor Author

#3065

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Type: something is unexpected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants