pingcap / tidb

TiDB - the open-source, cloud-native, distributed SQL database designed for modern applications.
https://pingcap.com
Apache License 2.0
37.34k stars 5.85k forks source link

br: fix flaky test `TestConcurrentLock` #57591

Open YuJuncen opened 1 day ago

YuJuncen commented 1 day ago

What problem does this PR solve?

Issue Number: ref https://github.com/pingcap/tidb/issues/56523

Problem Summary: The test case TestConcurrentLock isn't stable enough.

What changed and how does it work?

Make it more stable by stronger syncing.

# go test -count 2000 -run '^TestConcurrentLock$' github.com/pingcap/tidb/br/pkg/storage
ok      github.com/pingcap/tidb/br/pkg/storage  9.397s

Check List

Tests

Side effects

Documentation

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None
tiprow[bot] commented 1 day ago

Hi @YuJuncen. Thanks for your PR.

PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
codecov[bot] commented 1 day ago

Codecov Report

Attention: Patch coverage is 35.71429% with 9 lines in your changes missing coverage. Please review.

Project coverage is 74.7237%. Comparing base (91c14a4) to head (2758b86). Report is 16 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #57591 +/- ## ================================================ + Coverage 72.8590% 74.7237% +1.8646% ================================================ Files 1676 1721 +45 Lines 463653 474401 +10748 ================================================ + Hits 337813 354490 +16677 + Misses 104979 97710 -7269 - Partials 20861 22201 +1340 ``` | [Flag](https://app.codecov.io/gh/pingcap/tidb/pull/57591/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap) | Coverage Δ | | |---|---|---| | [integration](https://app.codecov.io/gh/pingcap/tidb/pull/57591/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap) | `49.1900% <35.7142%> (?)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap#carryforward-flags-in-the-pull-request-comment) to find out more. | [Components](https://app.codecov.io/gh/pingcap/tidb/pull/57591/components?src=pr&el=components&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap) | Coverage Δ | | |---|---|---| | [dumpling](https://app.codecov.io/gh/pingcap/tidb/pull/57591/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap) | `52.7673% <ø> (ø)` | | | [parser](https://app.codecov.io/gh/pingcap/tidb/pull/57591/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap) | `∅ <ø> (∅)` | | | [br](https://app.codecov.io/gh/pingcap/tidb/pull/57591/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap) | `60.5770% <35.7142%> (+15.1265%)` | :arrow_up: |

🚨 Try these New Features:

ti-chi-bot[bot] commented 21 hours ago

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Tristan1900 Once this PR has been reviewed and has the lgtm label, please ask for approval from yujuncen, ensuring that each of them provides their approval before proceeding. For more information see the Code Review Process.

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

Needs approval from an approver in each of these files: - **[br/pkg/storage/OWNERS](https://github.com/pingcap/tidb/blob/master/br/pkg/storage/OWNERS)** Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
ti-chi-bot[bot] commented 21 hours ago

@Tristan1900: adding LGTM is restricted to approvers and reviewers in OWNERS files.

In response to [this](https://github.com/pingcap/tidb/pull/57591#pullrequestreview-2451791489): >LGTM! Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
YuJuncen commented 7 hours ago

/test unit-test

ti-chi-bot[bot] commented 7 hours ago

@YuJuncen: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
idc-jenkins-ci-tidb/check_dev_2 2758b86e737e32a8e0c474c3b0d61b977d4f6857 link true /test check-dev2
idc-jenkins-ci-tidb/unit-test 2758b86e737e32a8e0c474c3b0d61b977d4f6857 link true /test unit-test
pull-br-integration-test 2758b86e737e32a8e0c474c3b0d61b977d4f6857 link true /test pull-br-integration-test

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).