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

Add ctl tool for Raft Engine #144

Closed
tabokie opened this issue Nov 9, 2021 · 4 comments
Closed

Add ctl tool for Raft Engine #144

tabokie opened this issue Nov 9, 2021 · 4 comments
Assignees

Comments

@tabokie
Copy link
Member

tabokie commented Nov 9, 2021

We need a ctl tool to do data administration work mentioned in #99.

Some subcommands I have in mind:

  • Dump: dump out all operations in log files
    • ctl dump --file /path/to/file [--raft id1,id2,id3]
    • ctl dump --path /path path [--raft id1,id2,id3]
  • Consistency check: check log files for logical errors
    • ctl check --path /path
  • Truncate: unsafely truncate log entries in log files
    • ctl truncate --path /path --mode front/back/all --queue append/rewrite/all [--raft id1,id2,id3]
  • Autofill: repair log entry holes by fill in empty message
    • ctl autofill --path /path --queue append/rewrite/all [--raft id1,id2,id3]\

We can use structopt to build a skeleton for this tool, fill in implementation later.

@yuqi1129
Copy link
Contributor

/assign

@tabokie
Copy link
Member Author

tabokie commented Nov 22, 2021

Closing this, the implementation of commands can be tracked in #99

@tabokie tabokie closed this as completed Nov 22, 2021
@yuqi1129
Copy link
Contributor

yuqi1129 commented Dec 8, 2021

@tabokie , Should we do not need to implement the subcommand autofill , I have noticed that you have deleted this logic in main.rs in ctl

Cmd::Dump { path, raft_groups } => self.dump(path, raft_groups),
Cmd::Truncate {
path,
mode,
queue,
raft_groups,
} => self.truncate(path, mode, queue, raft_groups),
Cmd::Check { path } => self.check(path),

@tabokie
Copy link
Member Author

tabokie commented Dec 8, 2021

@yuqi1129 Yes, no need

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants