-
Notifications
You must be signed in to change notification settings - Fork 58
feat(op_status_lock): add a command to unlock meta_op_status manually #1014
base: master
Are you sure you want to change the base?
Conversation
@@ -228,6 +228,8 @@ class replication_ddl_client | |||
error_with<query_app_manual_compact_response> | |||
query_app_manual_compact(const std::string &app_name); | |||
|
|||
dsn::error_code unlock_meta_op_status(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove dsn::
@@ -1712,5 +1712,23 @@ replication_ddl_client::query_app_manual_compact(const std::string &app_name) | |||
query_manual_compact_rpc(std::move(req), RPC_CM_QUERY_MANUAL_COMPACT_STATUS)); | |||
} | |||
|
|||
dsn::error_code replication_ddl_client::unlock_meta_op_status() | |||
{ | |||
std::shared_ptr<unlock_meta_op_status_request> req = |
There was a problem hiding this comment.
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>();
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); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this blank line
src/meta/meta_service.cpp
Outdated
{ | ||
ddebug_f("UNLOCK meta op status from {}", enum_to_string(_meta_op_status.load())); | ||
ddebug_f("UNLOCK meta op status from {}, is_manual {}", |
There was a problem hiding this comment.
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);
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
} | ||
|
||
unlock_meta_op_status_response resp; | ||
::dsn::unmarshall(resp_task->get_response(), resp); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove ::dsn::
@@ -1712,5 +1712,23 @@ replication_ddl_client::query_app_manual_compact(const std::string &app_name) | |||
query_manual_compact_rpc(std::move(req), RPC_CM_QUERY_MANUAL_COMPACT_STATUS)); | |||
} | |||
|
|||
dsn::error_code replication_ddl_client::unlock_meta_op_status() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same
@@ -329,7 +329,7 @@ class app_info | |||
expire_second(0), | |||
create_second(0), | |||
drop_second(0), | |||
duplicating(0), | |||
duplicating(false), |
There was a problem hiding this comment.
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.
@@ -162,7 +162,7 @@ class meta_service : public serverlet<meta_service> | |||
size_t get_alive_node_count() const; | |||
|
|||
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); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just for debug log
apache/incubator-pegasus#845
Add a command to unlock meta_op_status manually. And show meta_op_status in Pegasus shell : "cluster_info".