Skip to content

Add 4 letters words to NuRaftKeeper #28649

@JackyWoo

Description

@JackyWoo

Use case

To monitor NuRaftKeeper internal status such as server info, client info, watch info, ephemeral nodes info etc. Zookeeper provides 4 letters admin tool. You can check it here.

Describe the solution you'd like

  1. When startup register 4 letter word command with a <code, command_executor> map. The code is name reinterpreted int32.
  2. When new connection comes, first extract the first 4 characters and check whether it is 4lw command, if yes, run the command.
  3. add some methods to KeeperStorageDispatcher to collect server info.

Because the first request of a connection is hand shake request whose first 4 characters is request length and the length is fixed 44 or 45. All 4lw code is larger than 2^24 or lower than 0, so collision never happens.

In JD, we already added some 4lw commands to SvsKeeper which is a NuRaft based system likeNuRaftKeeper . If the idea is ok, I'd like to add it to NuRaftKeeper

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions