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

cannot drop zone from group, although there's no any partition in the zone #3063

Closed
HarrisChu opened this issue Oct 14, 2021 · 4 comments
Closed
Assignees
Labels
type/bug Type: something is unexpected
Milestone

Comments

@HarrisChu
Copy link
Contributor

HarrisChu commented Oct 14, 2021

2.6.0 branch.

  1. create space on a group with 3 replicas and 4 zones.
  2. balance remove data {all host in a zone}
  3. drop zone {zone} from group

expected result:

  1. as all partitions are removed from zone, the zone can be dropped.

actual result:

  1. Conflict error
(root@nebula) [s2]> desc group g1
+------+
| Zone |
+------+
| "z1" |
+------+
| "z2" |
+------+
| "z3" |
+------+
| "z4" |
+------+
Got 4 rows (time spent 656/6543 us)

Thu, 14 Oct 2021 11:32:55 CST
(root@nebula) [(none)]> create space s2(replica_factor=3, vid_type=int, partition_num=4) on g1
Execution succeeded (time spent 1011/12510 us)

Thu, 14 Oct 2021 11:29:33 CST

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

Thu, 14 Oct 2021 11:29:36 CST

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

Thu, 14 Oct 2021 11:29:37 CST

(root@nebula) [s2]>  balance data remove "cbrpnm-storaged-0.cbrpnm-storaged-headless.default.svc.cluster.local":9779,"cbrpnm-storaged-1.cbrpnm-storaged-headless.default.svc.cluster.local":9779,"cbrpnm-storaged-2.cbrpnm-storaged-headless.default.svc.cluster.local":9779
+------------+
| ID         |
+------------+
| 1634182321 |
+------------+
Got 1 rows (time spent 1734/12795 us)

(root@nebula) [s2]> balance data 1634182321
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------+
| balanceId, spaceId:partId, src->dst                                                                                                                                        | status      |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------+
| "[1634182321, 15:1, cbrpnm-storaged-0.cbrpnm-storaged-headless.default.svc.cluster.local:9779->cbrpnm-storaged-5.cbrpnm-storaged-headless.default.svc.cluster.local:9779]" | "SUCCEEDED" |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------+
| "[1634182321, 15:3, cbrpnm-storaged-1.cbrpnm-storaged-headless.default.svc.cluster.local:9779->cbrpnm-storaged-5.cbrpnm-storaged-headless.default.svc.cluster.local:9779]" | "SUCCEEDED" |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------+
| "[1634182321, 15:4, cbrpnm-storaged-2.cbrpnm-storaged-headless.default.svc.cluster.local:9779->cbrpnm-storaged-6.cbrpnm-storaged-headless.default.svc.cluster.local:9779]" | "SUCCEEDED" |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------+
| "Total:3, Succeeded:3, Failed:0, In Progress:0, Invalid:0"                                                                                                                 | 100.0       |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------+
Got 4 rows (time spent 701/6520 us)

Thu, 14 Oct 2021 11:30:27 CST

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

(root@nebula) [s2]> drop zone z1 from group g1
[ERROR (-1005)]: Conflict!

Thu, 14 Oct 2021 11:30:44 CST
@HarrisChu HarrisChu added the type/bug Type: something is unexpected label Oct 14, 2021
@HarrisChu HarrisChu added this to the v2.6.0 milestone Oct 14, 2021
@HarrisChu
Copy link
Contributor Author

@cooper-lzy cc

@HarrisChu
Copy link
Contributor Author

HarrisChu commented Oct 14, 2021

it can be dropped after drop space, but I think it's not a good idea for user.

(root@nebula) [s2]> drop space s2
Execution succeeded (time spent 734/10356 us)

(root@nebula) [(none)]> drop zone z1 from group g1
Execution succeeded (time spent 808/6687 us)

Thu, 14 Oct 2021 11:39:19 CST

@darionyaphet
Copy link
Contributor

Because create space on G1 and z1 belong to it. Although z1 have no host on it, but should not remove from group

@HarrisChu
Copy link
Contributor Author

Ok for me, it's much more complex if we verify it dynamically.
Maybe we could enhance it in future.

@critical27 cc.

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

No branches or pull requests

2 participants