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

drop zone from group should verify if hosts in zone have partitions #2933

Closed
HarrisChu opened this issue Sep 26, 2021 · 1 comment · Fixed by #2942
Closed

drop zone from group should verify if hosts in zone have partitions #2933

HarrisChu opened this issue Sep 26, 2021 · 1 comment · Fixed by #2942
Assignees
Labels
type/bug Type: something is unexpected
Milestone

Comments

@HarrisChu
Copy link
Contributor

(root@nebula) [s2]> show zones
+------+------------------------------------------------------------------------+------+
| Name | Host                                                                   | Port |
+------+------------------------------------------------------------------------+------+
| "z1" | "dojmsh-storaged-0.dojmsh-storaged-headless.default.svc.cluster.local" | 9779 |
+------+------------------------------------------------------------------------+------+
| "z1" | "dojmsh-storaged-1.dojmsh-storaged-headless.default.svc.cluster.local" | 9779 |
+------+------------------------------------------------------------------------+------+
| "z2" | "dojmsh-storaged-2.dojmsh-storaged-headless.default.svc.cluster.local" | 9779 |
+------+------------------------------------------------------------------------+------+
| "z3" | "dojmsh-storaged-3.dojmsh-storaged-headless.default.svc.cluster.local" | 9779 |
+------+------------------------------------------------------------------------+------+
| "z4" | "dojmsh-storaged-4.dojmsh-storaged-headless.default.svc.cluster.local" | 9779 |
+------+------------------------------------------------------------------------+------+
| "z4" | "dojmsh-storaged-5.dojmsh-storaged-headless.default.svc.cluster.local" | 9779 |
+------+------------------------------------------------------------------------+------+
(root@nebula) [(none)]> add group g2 z2,z3,z4

Execution succeeded (time spent 3084/4042 us)

Sun, 26 Sep 2021 16:10:47 CST

(root@nebula) [(none)]> create space s2 (vid_type=int, replica_factor=3, partition_num=4) on g2

Execution succeeded (time spent 3070/4098 us)

Sun, 26 Sep 2021 16:11:02 CST

(root@nebula) [(none)]> use s2
Execution succeeded (time spent 2472/3534 us)

Sun, 26 Sep 2021 16:11:16 CST

(root@nebula) [s2]> show parts
+--------------+-----------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------+
| Partition ID | Leader                                                                      | Peers                                                                                                                                                                                                                             | Losts |
+--------------+-----------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------+
| 1            | "dojmsh-storaged-2.dojmsh-storaged-headless.default.svc.cluster.local:9779" | "dojmsh-storaged-4.dojmsh-storaged-headless.default.svc.cluster.local:9779, dojmsh-storaged-2.dojmsh-storaged-headless.default.svc.cluster.local:9779, dojmsh-storaged-3.dojmsh-storaged-headless.default.svc.cluster.local:9779" | ""    |
+--------------+-----------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------+
| 2            | "dojmsh-storaged-3.dojmsh-storaged-headless.default.svc.cluster.local:9779" | "dojmsh-storaged-5.dojmsh-storaged-headless.default.svc.cluster.local:9779, dojmsh-storaged-2.dojmsh-storaged-headless.default.svc.cluster.local:9779, dojmsh-storaged-3.dojmsh-storaged-headless.default.svc.cluster.local:9779" | ""    |
+--------------+-----------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------+
| 3            | "dojmsh-storaged-3.dojmsh-storaged-headless.default.svc.cluster.local:9779" | "dojmsh-storaged-4.dojmsh-storaged-headless.default.svc.cluster.local:9779, dojmsh-storaged-2.dojmsh-storaged-headless.default.svc.cluster.local:9779, dojmsh-storaged-3.dojmsh-storaged-headless.default.svc.cluster.local:9779" | ""    |
+--------------+-----------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------+
| 4            | "dojmsh-storaged-5.dojmsh-storaged-headless.default.svc.cluster.local:9779" | "dojmsh-storaged-5.dojmsh-storaged-headless.default.svc.cluster.local:9779, dojmsh-storaged-2.dojmsh-storaged-headless.default.svc.cluster.local:9779, dojmsh-storaged-3.dojmsh-storaged-headless.default.svc.cluster.local:9779" | ""    |
+--------------+-----------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------+
Got 4 rows (time spent 2160/3153 us)

Sun, 26 Sep 2021 16:11:18 CST


(root@nebula) [s2]> drop zone z2 from group g2
Execution succeeded (time spent 2452/3428 us)

Sun, 26 Sep 2021 16:11:33 CST

(root@nebula) [s2]> show parts
+--------------+-----------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------+
| Partition ID | Leader                                                                      | Peers                                                                                                                                                                                                                             | Losts |
+--------------+-----------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------+
| 1            | "dojmsh-storaged-2.dojmsh-storaged-headless.default.svc.cluster.local:9779" | "dojmsh-storaged-4.dojmsh-storaged-headless.default.svc.cluster.local:9779, dojmsh-storaged-2.dojmsh-storaged-headless.default.svc.cluster.local:9779, dojmsh-storaged-3.dojmsh-storaged-headless.default.svc.cluster.local:9779" | ""    |
+--------------+-----------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------+
| 2            | "dojmsh-storaged-3.dojmsh-storaged-headless.default.svc.cluster.local:9779" | "dojmsh-storaged-5.dojmsh-storaged-headless.default.svc.cluster.local:9779, dojmsh-storaged-2.dojmsh-storaged-headless.default.svc.cluster.local:9779, dojmsh-storaged-3.dojmsh-storaged-headless.default.svc.cluster.local:9779" | ""    |
+--------------+-----------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------+
| 3            | "dojmsh-storaged-3.dojmsh-storaged-headless.default.svc.cluster.local:9779" | "dojmsh-storaged-4.dojmsh-storaged-headless.default.svc.cluster.local:9779, dojmsh-storaged-2.dojmsh-storaged-headless.default.svc.cluster.local:9779, dojmsh-storaged-3.dojmsh-storaged-headless.default.svc.cluster.local:9779" | ""    |
+--------------+-----------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------+
| 4            | "dojmsh-storaged-5.dojmsh-storaged-headless.default.svc.cluster.local:9779" | "dojmsh-storaged-5.dojmsh-storaged-headless.default.svc.cluster.local:9779, dojmsh-storaged-2.dojmsh-storaged-headless.default.svc.cluster.local:9779, dojmsh-storaged-3.dojmsh-storaged-headless.default.svc.cluster.local:9779" | ""    |
+--------------+-----------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------+
Got 4 rows (time spent 2097/3085 us)

Sun, 26 Sep 2021 16:11:34 CST

expected result:

  1. hosts dojmsh-storaged-2 has parts depend on group g2, could not drop zone from g2.

actual result:

  1. drop zone from g2 successfullu.
  2. when run balance data, raise No hosts! error
(root@nebula) [s2]> balance data
[ERROR (-1005)]: No hosts!
@HarrisChu HarrisChu added the type/bug Type: something is unexpected label Sep 26, 2021
@HarrisChu HarrisChu added this to the v2.6.0 milestone Sep 26, 2021
@darionyaphet
Copy link
Contributor

#2942

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.

2 participants