diff --git a/src/dist/replication/lib/replica.h b/src/dist/replication/lib/replica.h index c44595cbf9..ec4baafb25 100644 --- a/src/dist/replication/lib/replica.h +++ b/src/dist/replication/lib/replica.h @@ -234,12 +234,12 @@ class replica : public serverlet, public ref_counter, public replica_ba void notify_learn_completion(); error_code apply_learned_state_from_private_log(learn_state &state); - bool prepare_learn_from_cache(const learn_request &request, - decree learn_start_decree, - decree local_committed_decree, - remote_learner_state &learner_state, - learn_response &response, - bool &delayed_replay_prepare_list); + bool prepare_cached_learn_state(const learn_request &request, + decree learn_start_decree, + decree local_committed_decree, + remote_learner_state &learner_state, + learn_response &response, + bool &delayed_replay_prepare_list); ///////////////////////////////////////////////////////////////// // failure handling diff --git a/src/dist/replication/lib/replica_learn.cpp b/src/dist/replication/lib/replica_learn.cpp index 37ab8347d0..484e121ac2 100644 --- a/src/dist/replication/lib/replica_learn.cpp +++ b/src/dist/replication/lib/replica_learn.cpp @@ -347,12 +347,12 @@ void replica::on_learn(dsn::message_ex *msg, const learn_request &request) // learn delta state or checkpoint // in this case, the state on the PS is still incomplete - if (!prepare_learn_from_cache(request, - learn_start_decree, - local_committed_decree, - learn_state, - response, - delayed_replay_prepare_list)) { + if (!prepare_cached_learn_state(request, + learn_start_decree, + local_committed_decree, + learner_state, + response, + delayed_replay_prepare_list)) { if (learn_start_decree > _app->last_durable_decree()) { ddebug("%s: on_learn[%016" PRIx64 "]: learner = %s, choose to learn private logs, " "because learn_start_decree(%" PRId64 ") > _app->last_durable_decree(%" PRId64