Skip to content

[Bug] [MasterServer] master will still work when it lose zk connection #7004

@caishunfeng

Description

@caishunfeng

Search before asking

  • I had searched in the issues and found no similar issues.

What happened

Now when master lose zk connection, it will still find commands and handle processInstance, because the condition ServerNodeManager.MASTER_SIZE and slot is not changed. So it may happen two masters have the same slot, and

I found MasterRegistryClient addConnectionStateListener when registry:
registryClient.addConnectionStateListener(newState -> { if (newState == ConnectionState.RECONNECTED || newState == ConnectionState.SUSPENDED) { registryClient.persistEphemeral(localNodePath, ""); } });

What you expected to happen

When master lose zk connection, stop processing command until reconnect.

How to reproduce

none

Anything else

No response

Version

dev

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    Waiting for replyWaiting for replybugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions