Skip to content
This repository was archived by the owner on Jun 23, 2022. It is now read-only.

feat(op_status_lock): add a command to unlock meta_op_status manually#1014

Open
GiantKing wants to merge 3 commits into
XiaoMi:masterfrom
GiantKing:op_status_cmd
Open

feat(op_status_lock): add a command to unlock meta_op_status manually#1014
GiantKing wants to merge 3 commits into
XiaoMi:masterfrom
GiantKing:op_status_cmd

Conversation

@GiantKing

Copy link
Copy Markdown
Contributor

apache/incubator-pegasus#845

Add a command to unlock meta_op_status manually. And show meta_op_status in Pegasus shell : "cluster_info".

error_with<query_app_manual_compact_response>
query_app_manual_compact(const std::string &app_name);

dsn::error_code unlock_meta_op_status();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove dsn::

Comment thread src/client/replication_ddl_client.cpp Outdated

dsn::error_code replication_ddl_client::unlock_meta_op_status()
{
std::shared_ptr<unlock_meta_op_status_request> req =

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

auto req = std::make_shared<unlock_meta_op_status_request>();

Comment thread src/client/replication_ddl_client.cpp Outdated
std::make_shared<unlock_meta_op_status_request>();

auto resp_task = request_meta<unlock_meta_op_status_request>(RPC_CM_UNLOCK_META_OP_STATUS, req);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this blank line

Comment thread src/meta/meta_service.cpp Outdated
void meta_service::unlock_meta_op_status(bool is_manual)
{
ddebug_f("UNLOCK meta op status from {}", enum_to_string(_meta_op_status.load()));
ddebug_f("UNLOCK meta op status from {}, is_manual {}",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ddebug_f("UNLOCK meta op status from {}, is_manual = {}", enum_to_string(_meta_op_status.load()), is_manual);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wrote as you say, but modified by clang-format. It is not bad in multi lines.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean add a = after is_manual

Comment thread src/client/replication_ddl_client.cpp Outdated
}

unlock_meta_op_status_response resp;
::dsn::unmarshall(resp_task->get_response(), resp);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove ::dsn::

Comment thread src/client/replication_ddl_client.cpp Outdated
query_manual_compact_rpc(std::move(req), RPC_CM_QUERY_MANUAL_COMPACT_STATUS));
}

dsn::error_code replication_ddl_client::unlock_meta_op_status()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

create_second(0),
drop_second(0),
duplicating(0),
duplicating(false),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does this files change? It seems that related .thrift is not updated.

Comment thread src/meta/meta_service.h

bool try_lock_meta_op_status(meta_op_status op_status);
void unlock_meta_op_status();
void unlock_meta_op_status(bool is_manual = false);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that is_manual is useless, what is it usage?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just for debug log

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants