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

log_backup: add lock for truncating #49469

Merged
merged 5 commits into from
Dec 22, 2023
Merged

Conversation

YuJuncen
Copy link
Contributor

What problem does this PR solve?

Issue Number: close #49414

Problem Summary:
See the issue.

What changed and how does it work?

This PR added a lock while we are doing truncating.
The lock will be send with metadata of the node that locks the storage, so other can read the lock and decide whether it is valid.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
image - [ ] No need to test > - [ ] I checked and no code files have been changed. >

Release note

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

Concurrent run of log truncate will cause fail now.

@ti-chi-bot ti-chi-bot bot added needs-cherry-pick-release-6.5 Should cherry pick this PR to release-6.5 branch. release-note Denotes a PR that will be considered when it comes time to generate release notes. needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Dec 14, 2023
Copy link

tiprow bot commented Dec 14, 2023

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

Copy link

codecov bot commented Dec 14, 2023

Codecov Report

Merging #49469 (fa73f1a) into master (64430c3) will increase coverage by 0.5170%.
Report is 90 commits behind head on master.
The diff coverage is 0.0000%.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #49469        +/-   ##
================================================
+ Coverage   71.0560%   71.5730%   +0.5170%     
================================================
  Files          1368       1424        +56     
  Lines        401362     431042     +29680     
================================================
+ Hits         285192     308510     +23318     
- Misses        96344     103404      +7060     
+ Partials      19826      19128       -698     
Flag Coverage Δ
integration 43.6441% <0.0000%> (?)
unit 71.0561% <ø> (+0.0001%) ⬆️

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

Components Coverage Δ
dumpling 53.9663% <ø> (ø)
parser ∅ <ø> (∅)
br 46.9068% <0.0000%> (-5.9867%) ⬇️

br/pkg/storage/locking.go Show resolved Hide resolved
@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Dec 15, 2023
Signed-off-by: hillium <[email protected]>
@ti-chi-bot ti-chi-bot bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Dec 15, 2023
@BornChanger
Copy link
Contributor

/retest

Copy link

tiprow bot commented Dec 17, 2023

@BornChanger: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/retest

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.

@ti-chi-bot ti-chi-bot bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Dec 21, 2023
Copy link

ti-chi-bot bot commented Dec 22, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: BornChanger, Leavrth

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

The pull request process is described 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

@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Dec 22, 2023
Copy link

ti-chi-bot bot commented Dec 22, 2023

[LGTM Timeline notifier]

Timeline:

  • 2023-12-15 02:09:33.787608037 +0000 UTC m=+581264.824834965: ☑️ agreed by Leavrth.
  • 2023-12-22 05:38:29.884379668 +0000 UTC m=+1198600.921606595: ☑️ agreed by BornChanger.

@ti-chi-bot ti-chi-bot bot merged commit 7b8c876 into pingcap:master Dec 22, 2023
28 of 29 checks passed
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-6.5: #49709.

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Dec 22, 2023
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-7.1: #49710.

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Dec 22, 2023
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-7.5: #49711.

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Dec 22, 2023
ti-chi-bot bot pushed a commit that referenced this pull request Dec 27, 2023
ti-chi-bot bot pushed a commit that referenced this pull request Feb 1, 2024
YuJuncen added a commit to ti-chi-bot/tidb that referenced this pull request Feb 27, 2024
ti-chi-bot bot pushed a commit that referenced this pull request Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm needs-cherry-pick-release-6.5 Should cherry pick this PR to release-6.5 branch. needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

log-backup: add mutual execution for log truncating.
4 participants