Skip to content

The nameserver should choose a master with a larger epoch when there are two masters in controller mode #6316

@RongtongJin

Description

@RongtongJin

The issue tracker is used for bug reporting purposes ONLY whereas feature request needs to follow the RIP process. To avoid unnecessary duplication, please check whether there is a previous issue before filing a new one.

It is recommended to start a discussion thread in the mailing lists or github discussions in cases of discussing your deployment plan, API clarification, and other non-bug-reporting issues.
We welcome any friendly suggestions, bug fixes, collaboration, and other improvements.

Please ensure that your bug report is clear and self-contained. Otherwise, it would take additional rounds of communication, thus more time, to understand the problem itself.

Generally, fixing an issue goes through the following steps:

  1. Understand the issue reported;
  2. Reproduce the unexpected behavior locally;
  3. Perform root cause analysis to identify the underlying problem;
  4. Create test cases to cover the identified problem;
  5. Work out a solution to rectify the behavior and make the newly created test cases pass;
  6. Make a pull request and go through peer review;

As a result, it would be very helpful yet challenging if you could provide an isolated project reproducing your reported issue. Anyway, please ensure your issue report is informative enough for the community to pick up. At a minimum, include the following hints:

image

在controller模式下,如上图所示,有可能会出现短暂双主。

另一种极端情况,两副本下Master发生非对称网络分区,Master Broker与所有Controller节点、slave节点发生网络隔离,但与NameServer之间网络正常,Slave这时候被提升成主,NameServer视角下会有两个Master。

上述这些情况是由于broker里面注册到namesrv和注册到controller是两个不相关的流程,我们需要保证NameServer选取epoch更大的Master保持其路由正常,拒绝epoch较小的Master,从而保证外部看到的路由是正确且一致的。

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions