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

rawkv: Fix unstable test-region-merge #13580

Merged
merged 5 commits into from Oct 11, 2022

Conversation

pingyu
Copy link
Contributor

@pingyu pingyu commented Oct 10, 2022

Signed-off-by: pingyu yuping@pingcap.com

What is changed and how it works?

Issue Number: Close #13582

What's Changed:

Fix unstable test `test_rawkv::test_region_merge`.

The failure of test_rawkv::test_region_merge should be caused by the fail point causal_ts_provider_flush, which make handle_update_max_timestamp in a busy loop and exhaust the pd worker of raftstore.

Related changes

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

Check List

Tests

  • Unit test
  • Integration test

Side effects

  • No.

Release note

Fix unstable test `test_rawkv::test_region_merge`.

Signed-off-by: pingyu <yuping@pingcap.com>
@ti-chi-bot
Copy link
Member

ti-chi-bot commented Oct 10, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • BusyJay
  • haojinming

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: pingyu <yuping@pingcap.com>
@ti-chi-bot ti-chi-bot added size/S and removed size/XS labels Oct 10, 2022
Signed-off-by: pingyu <yuping@pingcap.com>
@ti-chi-bot ti-chi-bot added size/XS and removed size/S labels Oct 10, 2022
Signed-off-by: pingyu <yuping@pingcap.com>
@ti-chi-bot ti-chi-bot added size/S and removed size/XS labels Oct 10, 2022
@pingyu
Copy link
Contributor Author

pingyu commented Oct 10, 2022

/run-test

@pingyu pingyu changed the title [Draft] rawkv: Fix unstable test-region-merge rawkv: Fix unstable test-region-merge Oct 10, 2022
@pingyu
Copy link
Contributor Author

pingyu commented Oct 10, 2022

/cc @haojinming @zeminzhou

@ti-chi-bot
Copy link
Member

@pingyu: GitHub didn't allow me to request PR reviews from the following users: zeminzhou.

Note that only tikv members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

/cc @haojinming @zeminzhou

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 kubernetes/test-infra repository.

@pingyu
Copy link
Contributor Author

pingyu commented Oct 10, 2022

/cc @haojinming @zeminzhou

PTAL, thanks~

@pingyu
Copy link
Contributor Author

pingyu commented Oct 10, 2022

/run-test

@pingyu pingyu closed this Oct 10, 2022
@pingyu pingyu reopened this Oct 10, 2022
Signed-off-by: pingyu <yuping@pingcap.com>
@@ -164,8 +164,8 @@ fn test_leader_transfer() {
assert_eq!(suite.must_raw_get(key1), Some(b"v4".to_vec()));
}

// Disable CausalObserver::flush_timestamp to produce causality issue.
fail::cfg(FP_CAUSAL_TS_PROVIDER_FLUSH, "return").unwrap();
// Make causal_ts_provider.async_flush() & handle_update_max_timestamp fail.
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you explain why failpoint FP_GET_TSO cant make causal_ts_provider.async_flush() & handle_update_max_timestamp fail ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The critical path of causal_ts_provider.async_flush() is getting a batch of TSOs from PD and renew the TSO cache. So the error of get_tso must make causal_ts_provider.async_flush() fail.
Please refer to BatchTsoProvider::renew_tso_batch_impl().

And handle_update_max_timestamp() invokes causal_ts_provider.async_flus() here (when storage.api-version = 2). So handle_update_max_timestamp() will also fail (and keep retrying until succeed).

Copy link
Contributor

@haojinming haojinming left a comment

Choose a reason for hiding this comment

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

LGTM

@ti-chi-bot ti-chi-bot added the status/LGT1 Status: PR - There is already 1 approval label Oct 11, 2022
Copy link
Contributor

@zeminzhou zeminzhou left a comment

Choose a reason for hiding this comment

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

LGTM~

@ti-chi-bot
Copy link
Member

@zeminzhou: Thanks for your review. The bot only counts approvals from reviewers and higher roles in list, but you're still welcome to leave your comments.

In response to this:

LGTM~

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 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 Oct 11, 2022
@pingyu
Copy link
Contributor Author

pingyu commented Oct 11, 2022

/merge

@ti-chi-bot
Copy link
Member

@pingyu: 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: f172881

@ti-chi-bot ti-chi-bot added the status/can-merge Status: Can merge to base branch label Oct 11, 2022
@ti-chi-bot ti-chi-bot merged commit 6d71c2b into tikv:master Oct 11, 2022
@ti-chi-bot ti-chi-bot added this to the Pool milestone Oct 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note size/S 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.

test: cases::test_rawkv::test_region_merge is unstable
6 participants