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

br: fix flaky test TestConcurrentLock #57591

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

YuJuncen
Copy link
Contributor

@YuJuncen YuJuncen commented Nov 21, 2024

What problem does this PR solve?

Issue Number: ref #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

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No need to test

    It is a test.

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

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

None

Signed-off-by: hillium <yujuncen@pingcap.com>
@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Nov 21, 2024
Copy link

tiprow bot commented Nov 21, 2024

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. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Copy link

codecov bot commented Nov 21, 2024

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
@@               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 Coverage Δ
integration 49.1900% <35.7142%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
dumpling 52.7673% <ø> (ø)
parser ∅ <ø> (∅)
br 60.5770% <35.7142%> (+15.1265%) ⬆️
---- 🚨 Try these New Features:

Signed-off-by: hillium <yujuncen@pingcap.com>
Copy link
Contributor

@Tristan1900 Tristan1900 left a comment

Choose a reason for hiding this comment

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

LGTM!

// Here the path targets to a directory and we will only call `Sync` over it.
// Disable the G304 warning which focus on relative path injection like "../../import_stuff".
//nolint: gosec
baseFD, err := os.Open(base)
Copy link
Contributor

Choose a reason for hiding this comment

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

should we close this baseFD in the Close method?

Copy link

ti-chi-bot bot commented Nov 21, 2024

[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:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link

ti-chi-bot bot commented Nov 21, 2024

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

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 kubernetes-sigs/prow repository.

Signed-off-by: hillium <yujuncen@pingcap.com>
@YuJuncen
Copy link
Contributor Author

/test unit-test

@YuJuncen YuJuncen closed this Nov 22, 2024
@YuJuncen YuJuncen reopened this Nov 22, 2024
Signed-off-by: hillium <yujuncen@pingcap.com>
Copy link

ti-chi-bot bot commented Nov 22, 2024

@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 2758b86 link true /test check-dev2
idc-jenkins-ci-tidb/unit-test 2758b86 link true /test unit-test
pull-br-integration-test 2758b86 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. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants