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

feat(op_status_lock): adapt to the modification in rdsn #880

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/shell/commands.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ bool cc_command(command_executor *e, shell_context *sc, arguments args);

bool query_cluster_info(command_executor *e, shell_context *sc, arguments args);

bool unlock_meta_op_status(command_executor *e, shell_context *sc, arguments args);

bool ls_nodes(command_executor *e, shell_context *sc, arguments args);

bool server_info(command_executor *e, shell_context *sc, arguments args);
Expand Down
9 changes: 9 additions & 0 deletions src/shell/commands/node_management.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,15 @@ bool query_cluster_info(command_executor *e, shell_context *sc, arguments args)
return true;
}

bool unlock_meta_op_status(command_executor *e, shell_context *sc, arguments args)
{
dsn::error_code err = sc->ddl_client->unlock_meta_op_status();
if (err != dsn::ERR_OK) {
std::cout << "unlock meta op status failed, error=" << err.to_string() << std::endl;
}
return true;
}

bool ls_nodes(command_executor *e, shell_context *sc, arguments args)
{
static struct option long_options[] = {{"detailed", no_argument, 0, 'd'},
Expand Down
3 changes: 3 additions & 0 deletions src/shell/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,9 @@ static command_executor commands[] = {
"<-d|--address str>",
detect_hotkey,
},
{
"unlock_meta_op_status", "set op_status of meta to FREE", "", unlock_meta_op_status,
},
{
"exit", "exit shell", "", exit_shell,
},
Expand Down