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

bug: when meta is down, show hosts metad result is wrong #3409

Closed
QingZ11 opened this issue Dec 6, 2021 · 4 comments
Closed

bug: when meta is down, show hosts metad result is wrong #3409

QingZ11 opened this issue Dec 6, 2021 · 4 comments
Assignees
Labels
community Source: who proposed the issue type/bug Type: something is unexpected wontfix Solution: this will not be worked on recently
Milestone

Comments

@QingZ11
Copy link
Contributor

QingZ11 commented Dec 6, 2021

@Sophie-Xie Sophie-Xie added the type/bug Type: something is unexpected label Dec 6, 2021
@Sophie-Xie Sophie-Xie added this to the v3.0.0 milestone Dec 6, 2021
@liuyu85cn
Copy link
Contributor

I agree this is a bug, but actually, it is the original design:
the key feature of "show hosts meta" is to check "GitInfoSha".
we want to check this to see if an upgrade succeeded,
and the "Online/Offline" column is hard coded as "Online";

However, user won't care about this, they may get confused by this bug.
In my opinion, we have some solution for this:

  1. Add a meta client to meta itself. Let all meta follower send heartbeat to meta leader.

    the problem is: it is a litter weird that a meta server also have a meta client.
    And this why we (with DanglePtr) decide to hard code the status "Online".

  2. raft layer of meta may have some clue, we can get to determine the status of meta follower.

    The problem is:
    We need to keep a vector to record last succeeded RPC call for all it's follower,
    Raft don't need this, and I don't think it is a good idea to
    add this thing, just for a nearly never used feature "show hosts meta".

  3. when trigger "show hosts meta". we do some simple network check.

    The problem is: Code for this may really ugly.

If we really need to fix this, I prefer the first one.

@panda-sheep
Copy link
Contributor

I agree this is a bug, but actually, it is the original design: the key feature of "show hosts meta" is to check "GitInfoSha". we want to check this to see if an upgrade succeeded, and the "Online/Offline" column is hard coded as "Online";

However, user won't care about this, they may get confused by this bug. In my opinion, we have some solution for this:

  1. Add a meta client to meta itself. Let all meta follower send heartbeat to meta leader.
    the problem is: it is a litter weird that a meta server also have a meta client.
    And this why we (with DanglePtr) decide to hard code the status "Online".
  2. raft layer of meta may have some clue, we can get to determine the status of meta follower.
    The problem is:
    We need to keep a vector to record last succeeded RPC call for all it's follower,
    Raft don't need this, and I don't think it is a good idea to
    add this thing, just for a nearly never used feature "show hosts meta".
  3. when trigger "show hosts meta". we do some simple network check.
    The problem is: Code for this may really ugly.

If we really need to fix this, I prefer the first one.

Good, 👍
I think the leader of raft can keep all the follower's last heartbeat or rpc success information.
This plan is more natural.

@critical27
Copy link
Contributor

Could do it after 1230

@critical27 critical27 modified the milestones: v3.1.0, v3.0.0 Dec 28, 2021
@critical27 critical27 added the type/enhancement Type: make the code neat or more efficient label Dec 28, 2021
@critical27 critical27 modified the milestones: v3.0.0, v3.1.0 Jan 11, 2022
@Sophie-Xie Sophie-Xie removed the type/enhancement Type: make the code neat or more efficient label Jan 27, 2022
@Sophie-Xie Sophie-Xie added the wontfix Solution: this will not be worked on recently label Mar 15, 2022
@critical27
Copy link
Contributor

Will fixed in next major version, close for now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Source: who proposed the issue type/bug Type: something is unexpected wontfix Solution: this will not be worked on recently
Projects
None yet
Development

No branches or pull requests

5 participants