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

lost host after merge zone #3656

Closed
HarrisChu opened this issue Jan 7, 2022 · 1 comment
Closed

lost host after merge zone #3656

HarrisChu opened this issue Jan 7, 2022 · 1 comment
Assignees
Labels
type/bug Type: something is unexpected
Milestone

Comments

@HarrisChu
Copy link
Contributor

steps:
start 3 metad, and 2 storage with 14814 and 18271 port

  1. add host 127.0.0.1:14814 into new zone "default_zone"
  2. add host 127.0.0.1:18271 into new zone "test_zone"
  3. add host "invalid":9779 into new zone "invalid_zone"
  4. MERGE ZONE "test_zone","invalid_zone" INTO "default_zone"
  5. SHOW ZONES

result:
lost a host in show zones

E   AssertionError: Fail to exec: SHOW ZONES
E     Response: |Name|Host|Port|
E     0: |default_zone|invalid|9779|
E     1: |default_zone|127.0.0.1|14814|
E     Expected: |Name|Host|Port|
E     0: |default_zone|127.0.0.1|14814|
E     1: |default_zone|127.0.0.1|18271|
E     2: |default_zone|invalid|9779|
E     NotFoundRow: 1: |default_zone|127.0.0.1|18271|
(root@nebula) [(none)]> show zones
+----------------+-------------+-------+
| Name           | Host        | Port  |
+----------------+-------------+-------+
| "default_zone" | "invalid"   | 9779  |
| "default_zone" | "127.0.0.1" | 16912 |
+----------------+-------------+-------+
Got 2 rows (time spent 2472/8066 us)

Fri, 07 Jan 2022 11:14:16 CST

(root@nebula) [(none)]> show hosts
+-------------+-------+-----------+--------------+----------------------+------------------------+
| Host        | Port  | Status    | Leader count | Leader distribution  | Partition distribution |
+-------------+-------+-----------+--------------+----------------------+------------------------+
| "127.0.0.1" | 16912 | "ONLINE"  | 0            | "No valid partition" | "No valid partition"   |
| "127.0.0.1" | 10320 | "ONLINE"  | 0            | "No valid partition" | "No valid partition"   |
| "invalid"   | 9779  | "OFFLINE" | 0            | "No valid partition" | "No valid partition"   |
| "Total"     |       |           | 0            |                      |                        |
+-------------+-------+-----------+--------------+----------------------+------------------------+
Got 4 rows (time spent 2635/7335 us)

Fri, 07 Jan 2022 11:15:22 CST

(root@nebula) [(none)]>
@HarrisChu HarrisChu added the type/bug Type: something is unexpected label Jan 7, 2022
@Sophie-Xie Sophie-Xie added this to the v3.0.0 milestone Jan 11, 2022
@darionyaphet
Copy link
Contributor

darionyaphet commented Jan 12, 2022

if so, you should use the following command:

MERGE ZONE "test_zone","invalid_zone","default_zone" INTO "default_zone"

And I will support more check to avoid it later.

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