Skip to content

Commit

Permalink
lyc 15
Browse files Browse the repository at this point in the history
  • Loading branch information
acelyc111 committed Jan 24, 2024
1 parent 70ce555 commit b16a879
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions src/replica/replica_learn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -605,10 +605,10 @@ void replica::on_learn_reply(error_code err, learn_request &&req, learn_response
"{}, learn_start_decree = {}, last_commit_decree = {}, current_learning_status = "
"{} ",
req.signature,
resp.config.hp_primary.to_string(),
resp.config.primary.to_string(),
resp.config.hp_primary,
resp.config.primary,
_potential_secondary_states.duration_ms(),
resp.err.to_string(),
resp.err,
resp.last_committed_decree,
resp.prepare_start_decree,
enum_to_string(resp.type),
Expand Down Expand Up @@ -1370,13 +1370,13 @@ void replica::on_learn_completion_notification(const group_check_response &repor
{
_checker.only_one_thread_access();

host_port hp;
GET_HOST_PORT(report, node, hp);
host_port hp_node;
GET_HOST_PORT(report, node, hp_node);

LOG_INFO_PREFIX(
"on_learn_completion_notification[{:#018x}]: learner = {}({}), learning_status = {}",
report.learner_signature,
hp,
hp_node,
report.node,
enum_to_string(report.learner_status_));

Expand All @@ -1388,7 +1388,7 @@ void replica::on_learn_completion_notification(const group_check_response &repor
"on_learn_completion_notification[{:#018x}]: learner = {}({}), this replica "
"is not primary, but {}, reply {}",
report.learner_signature,
hp,
hp_node,
report.node,
enum_to_string(status()),
response.err);
Expand All @@ -1398,16 +1398,16 @@ void replica::on_learn_completion_notification(const group_check_response &repor
"on_learn_completion_notification[{:#018x}]: learner = {}({}), learner_status "
"is not LearningSucceeded, but {}, reply ERR_INVALID_STATE",
report.learner_signature,
hp,
hp_node,
report.node,
enum_to_string(report.learner_status_));
} else {
response.err = handle_learning_succeeded_on_primary(hp, report.learner_signature);
response.err = handle_learning_succeeded_on_primary(hp_node, report.learner_signature);
if (response.err != ERR_OK) {
LOG_ERROR_PREFIX("on_learn_completion_notification[{:#018x}]: learner = {}({}), handle "
"learning succeeded on primary failed, reply {}",
report.learner_signature,
hp,
hp_node,
report.node,
response.err);
}
Expand Down Expand Up @@ -1479,8 +1479,8 @@ void replica::on_add_learner(const group_check_request &request)
{
LOG_INFO_PREFIX("process add learner, primary = {}({}), ballot ={}, status ={}, "
"last_committed_decree = {}, duplicating = {}",
request.config.hp_primary.to_string(),
request.config.primary.to_string(),
request.config.hp_primary,
request.config.primary,
request.config.ballot,
enum_to_string(request.config.status),
request.last_committed_decree,
Expand Down Expand Up @@ -1626,8 +1626,8 @@ error_code replica::apply_learned_state_from_private_log(learn_state &state)
_potential_secondary_states.learning_version,
duplicating,
step_back,
_config.hp_primary.to_string(),
_config.primary.to_string(),
_config.hp_primary,
_config.primary,
_potential_secondary_states.duration_ms(),
state.files.size(),
_potential_secondary_states.first_learn_start_decree,
Expand Down Expand Up @@ -1658,8 +1658,8 @@ error_code replica::apply_learned_state_from_private_log(learn_state &state)
"learned_to_decree_included({}) > last_committed_decree({}), commit to "
"to_decree_included",
_potential_secondary_states.learning_version,
_config.hp_primary.to_string(),
_config.primary.to_string(),
_config.hp_primary,
_config.primary,
state.to_decree_included,
last_committed_decree());
plist.commit(state.to_decree_included, COMMIT_TO_DECREE_SOFT);
Expand All @@ -1669,8 +1669,8 @@ error_code replica::apply_learned_state_from_private_log(learn_state &state)
"learn_duration ={} ms, apply in-buffer private logs done, "
"replay_count ={}, app_committed_decree = {}",
_potential_secondary_states.learning_version,
_config.hp_primary.to_string(),
_config.primary.to_string(),
_config.hp_primary,
_config.primary,
_potential_secondary_states.duration_ms(),
replay_count,
_app->last_committed_decree());
Expand Down

0 comments on commit b16a879

Please sign in to comment.