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

refactor: move primary's learning preparation of cache into another function #368

Merged
merged 14 commits into from
Mar 3, 2021

Conversation

neverchanje
Copy link
Contributor

No description provided.

@neverchanje neverchanje changed the title refactor: move primary's learning preparation of cache into another function refactor: move primary's learning preparation of cache into another function [WIP] Feb 19, 2020
@neverchanje neverchanje changed the title refactor: move primary's learning preparation of cache into another function [WIP] refactor: move primary's learning preparation of cache into another function Feb 28, 2021
count,
response.state.meta.length());
}

// learn delta state or checkpoint
// in this case, the state on the PS is still incomplete
Copy link
Contributor

Choose a reason for hiding this comment

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

learner_state,
response,
delayed_replay_prepare_list);
if (!should_learn_cache) {
if (learn_start_decree > _app->last_durable_decree()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems that the comments are for condition if (learn_start_decree > _app->last_durable_decree()) in line 449, it is better to move comments between line 448 and line 449.

// learn delta state or checkpoint
// in this case, the state on the PS is still incomplete

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think "delta state" stands for log and cache. So it's still reasonable to see this comment stands above L442. I don't know what's the initial intention of this comment.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sounds reasonable~ I recommend removing comment // in this case, the state on the PS is still incomplete which is useless and confusing.

@neverchanje neverchanje closed this Mar 2, 2021
@neverchanje neverchanje reopened this Mar 2, 2021
@neverchanje neverchanje merged commit 7d6f56b into XiaoMi:master Mar 3, 2021
@neverchanje neverchanje deleted the learnrefact branch March 3, 2021 03:32
@hycdong hycdong added the 2.2.0 label Aug 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants