Skip to content

Commit

Permalink
fix logs
Browse files Browse the repository at this point in the history
  • Loading branch information
empiredan committed Nov 14, 2024
1 parent b648a16 commit 39ac18d
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions src/meta/duplication/meta_duplication_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -574,9 +574,11 @@ void meta_duplication_service::on_follower_app_creating_for_duplication(

if (update_err != ERR_OK) {
LOG_ERROR("create follower app(cluster_name={}, app_name={}) to trigger duplicate "
"checkpoint failed: duplication_status={}, create_err={}, update_err={}",
"checkpoint failed: master_app_name={}, duplication_status={}, "
"create_err={}, update_err={}",
dup->remote_cluster_name,
dup->remote_app_name,
dup->app_name,
duplication_status_to_string(dup->status()),
create_err,
update_err);
Expand All @@ -591,9 +593,10 @@ void meta_duplication_service::on_follower_app_creating_for_duplication(
std::string(dup->store_path), std::move(value), [dup]() {
dup->persist_status();
LOG_INFO("create follower app(cluster_name={}, app_name={}) to trigger duplicate "
"checkpoint successfully: duplication_status={}",
"checkpoint successfully: master_app_name={}, duplication_status={}",
dup->remote_cluster_name,
dup->remote_app_name,
dup->app_name,
duplication_status_to_string(dup->status()));
});
}
Expand All @@ -609,9 +612,10 @@ void meta_duplication_service::on_follower_app_created_for_duplication(

if (err != ERR_OK || resp.err != ERR_OK) {
LOG_ERROR("mark follower app(cluster_name={}, app_name={}) as created failed: "
"duplication_status={}, callback_err={}, resp_err={}",
"master_app_name={}, duplication_status={}, callback_err={}, resp_err={}",
dup->remote_cluster_name,
dup->remote_app_name,
dup->app_name,
duplication_status_to_string(dup->status()),
err,
resp.err);
Expand Down Expand Up @@ -690,7 +694,7 @@ void meta_duplication_service::check_follower_app_if_create_completed(
dsn::message_ex *msg = dsn::message_ex::create_request(RPC_CM_QUERY_PARTITION_CONFIG_BY_INDEX);
dsn::marshall(msg, meta_config_request);

LOG_INFO("send request to check if all replicas of follower app(cluster_name={}, "
LOG_INFO("send request to check if all replicas of creating follower app(cluster_name={}, "
"app_name={}) are ready: master_app_name={}, duplication_status={}",
dup->remote_cluster_name,
dup->remote_app_name,
Expand Down Expand Up @@ -752,11 +756,12 @@ void meta_duplication_service::check_follower_app_if_create_completed(
[](std::string_view) -> void { return; });

if (update_err != ERR_OK) {
LOG_ERROR("query follower app(cluster_name={}, app_name={}) replica "
"configuration completed, result: duplication_status={}, "
LOG_ERROR("check all replicas of creating follower app(cluster_name={}, "
"app_name={}): master_app_name={}, duplication_status={}, "
"query_err={}, update_err={}",
dup->remote_cluster_name,
dup->remote_app_name,
dup->app_name,
duplication_status_to_string(dup->status()),
query_err,
update_err);
Expand All @@ -771,9 +776,10 @@ void meta_duplication_service::check_follower_app_if_create_completed(
std::string(dup->store_path), std::move(value), [dup]() {
dup->persist_status();
LOG_INFO("all replicas of follower app(cluster_name={}, app_name={}) "
"have been ready: duplication_status={}",
"have been ready: master_app_name={}, duplication_status={}",
dup->remote_cluster_name,
dup->remote_app_name,
dup->app_name,
duplication_status_to_string(dup->status()));
});
});
Expand Down

0 comments on commit 39ac18d

Please sign in to comment.