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

add zone is not compatible with default zone #2851

Closed
HarrisChu opened this issue Sep 13, 2021 · 3 comments
Closed

add zone is not compatible with default zone #2851

HarrisChu opened this issue Sep 13, 2021 · 3 comments
Assignees
Labels
type/bug Type: something is unexpected
Milestone

Comments

@HarrisChu
Copy link
Contributor

steps:

  1. create space s0 (vid_type=int, replica_factor=3, partition_num=4)
  2. host has some part.
  3. use the host to add zone.

expect result:

  1. as discussed offline, host should in default zone.
  2. cannot add this host to other zones.

actual result:

  1. add zone successfully.
(root@nebula) [s1]> show hosts
+------------------------------------------------------------------------+------+----------+--------------+----------------------+------------------------+
| Host                                                                   | Port | Status   | Leader count | Leader distribution  | Partition distribution |
+------------------------------------------------------------------------+------+----------+--------------+----------------------+------------------------+
| "fpplsn-storaged-0.fpplsn-storaged-headless.default.svc.cluster.local" | 9779 | "ONLINE" | 0            | "No valid partition" | "No valid partition"   |
+------------------------------------------------------------------------+------+----------+--------------+----------------------+------------------------+
| "fpplsn-storaged-1.fpplsn-storaged-headless.default.svc.cluster.local" | 9779 | "ONLINE" | 0            | "No valid partition" | "s0:1"                 |
+------------------------------------------------------------------------+------+----------+--------------+----------------------+------------------------+
| "fpplsn-storaged-2.fpplsn-storaged-headless.default.svc.cluster.local" | 9779 | "ONLINE" | 4            | "s1:4"               | "s0:2, s1:4"           |
+------------------------------------------------------------------------+------+----------+--------------+----------------------+------------------------+
| "fpplsn-storaged-3.fpplsn-storaged-headless.default.svc.cluster.local" | 9779 | "ONLINE" | 3            | "s0:3"               | "s0:3"                 |
+------------------------------------------------------------------------+------+----------+--------------+----------------------+------------------------+
| "fpplsn-storaged-4.fpplsn-storaged-headless.default.svc.cluster.local" | 9779 | "ONLINE" | 0            | "No valid partition" | "s0:3"                 |
+------------------------------------------------------------------------+------+----------+--------------+----------------------+------------------------+
| "fpplsn-storaged-5.fpplsn-storaged-headless.default.svc.cluster.local" | 9779 | "ONLINE" | 1            | "s0:1"               | "s0:2"                 |
+------------------------------------------------------------------------+------+----------+--------------+----------------------+------------------------+
| "fpplsn-storaged-6.fpplsn-storaged-headless.default.svc.cluster.local" | 9779 | "ONLINE" | 0            | "No valid partition" | "s0:1"                 |
+------------------------------------------------------------------------+------+----------+--------------+----------------------+------------------------+
| "Total"                                                                |      |          | 8            | "s0:4, s1:4"         | "s0:12, s1:4"          |
+------------------------------------------------------------------------+------+----------+--------------+----------------------+------------------------+
Got 8 rows (time spent 827/1549 us)


(root@nebula) [s1]>  add zone z5 "fpplsn-storaged-5.fpplsn-storaged-headless.default.svc.cluster.local":9779
Execution succeeded (time spent 1023/1425 us)

Mon, 13 Sep 2021 07:59:38 UTC

(root@nebula) [s1]> show zones
+------+------------------------------------------------------------------------+------+
| Name | Host                                                                   | Port |
+------+------------------------------------------------------------------------+------+
| "z2" | "fpplsn-storaged-1.fpplsn-storaged-headless.default.svc.cluster.local" | 9779 |
+------+------------------------------------------------------------------------+------+
| "z5" | "fpplsn-storaged-5.fpplsn-storaged-headless.default.svc.cluster.local" | 9779 |
+------+------------------------------------------------------------------------+------+
Got 2 rows (time spent 846/2283 us)

Mon, 13 Sep 2021 08:13:30 UTC

@HarrisChu HarrisChu added the type/bug Type: something is unexpected label Sep 13, 2021
@HarrisChu HarrisChu added this to the v2.6.0 milestone Sep 13, 2021
@darionyaphet
Copy link
Contributor

darionyaphet commented Sep 16, 2021

Firstly, not existed default zone.

default group is a logical concept and could add host into another zone.

it's seems not a bug

@HarrisChu
Copy link
Contributor Author

HarrisChu commented Sep 16, 2021

3 storages in a cluster

  1. create space on default group, storage A has partition P1
  2. add zone z1 with storage A and add group g1
  3. create another space on g1 group
  4. storage A has partition P2

so P1 is not in any zone, and P2 in zone z1.

It may be confused for balance remove, remove host from zone.

@darionyaphet
Copy link
Contributor

after talk offline this is not a bug

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

3 participants