-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Add 4 letters words to NuRaftKeeper #28649
Copy link
Copy link
Closed
Labels
Description
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
- When startup register 4 letter word command with a <code, command_executor> map. The code is name reinterpreted int32.
- When new connection comes, first extract the first 4 characters and check whether it is 4lw command, if yes, run the command.
- add some methods to
KeeperStorageDispatcherto 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
Reactions are currently unavailable