Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

raftstore-v2: schedule raft tick after apply snapshot #14550

Merged
merged 5 commits into from Apr 18, 2023

Conversation

SpadeA-Tang
Copy link
Member

What is changed and how it works?

Issue Number: Close #14548, #14532

What's Changed:

schedule raft tick after apply snapshot 

Related changes

  • PR to update pingcap/docs/pingcap/docs-cn:
  • Need to cherry-pick to the release branch

Check List

Tests

  • Unit test
  • Integration test

Release note

None

Signed-off-by: Spade A <u6748471@anu.edu.au>
@ti-chi-bot
Copy link
Member

ti-chi-bot commented Apr 10, 2023

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • bufferflies
  • tonyxuqqi

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

Signed-off-by: Spade A <u6748471@anu.edu.au>
@@ -900,3 +900,36 @@ fn test_snapshot_recover_from_raft_write_failure_with_uncommitted_log() {
cluster.must_put(format!("k1{}", i).as_bytes(), b"v1");
}
}

#[test]
fn test_issue_14548() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe you should rename it and add the issue linked this the test function?

Copy link
Member Author

Choose a reason for hiding this comment

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

Any suggestions for the name of the test?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it's better to rename the test with the test function.
In this case, maybe test_write_after_network_partition

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

Copy link
Contributor

@bufferflies bufferflies left a comment

Choose a reason for hiding this comment

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

rest LGTM

@ti-chi-bot ti-chi-bot added the status/LGT1 Status: PR - There is already 1 approval label Apr 11, 2023
apply_state.set_applied_index(5);
});
};
reset_apply_index();
Copy link
Contributor

@tonyxuqqi tonyxuqqi Apr 18, 2023

Choose a reason for hiding this comment

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

why not calling

fail_point!("RESET_APPLY_INDEX_WHEN_RESTART", |_| {
                apply_state.set_applied_index(5);
            });

directly?

Copy link
Member Author

Choose a reason for hiding this comment

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

The failpoint will return.

Copy link
Contributor

@tonyxuqqi tonyxuqqi left a comment

Choose a reason for hiding this comment

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

Some minor issues are better to address before the merge.

@ti-chi-bot ti-chi-bot added status/LGT2 Status: PR - There are already 2 approvals and removed status/LGT1 Status: PR - There is already 1 approval labels Apr 18, 2023
SpadeA-Tang and others added 2 commits April 18, 2023 12:58
Signed-off-by: Spade A <u6748471@anu.edu.au>
@tonyxuqqi
Copy link
Contributor

/merge

@ti-chi-bot
Copy link
Member

@tonyxuqqi: It seems you want to merge this PR, I will help you trigger all the tests:

/run-all-tests

You only need to trigger /merge once, and if the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

If you have any questions about the PR merge process, please refer to pr process.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: 58b74ae

@ti-chi-bot ti-chi-bot added the status/can-merge Status: Can merge to base branch label Apr 18, 2023
@ti-chi-bot ti-chi-bot merged commit e024556 into tikv:master Apr 18, 2023
7 checks passed
@ti-chi-bot ti-chi-bot added this to the Pool milestone Apr 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note-none size/M status/can-merge Status: Can merge to base branch status/LGT2 Status: PR - There are already 2 approvals
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Dynamic Regions] raft tick may be missing
4 participants