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 fast compact bugs #6103

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

br: fix fast compact bugs #6103

wants to merge 11 commits into from

Conversation

RidRisR
Copy link
Contributor

@RidRisR RidRisR commented Mar 3, 2025

What problem does this PR solve?

  1. If we use checkpoint span as the only indicator on compact or not, when the log backup checkpoint get stuck, the progress [last compact, checkpoint] would not be compact due to (checkpoint - last compact)<compact_span

  2. If the last_backup_ts exceeds the checkpoint, we should also set it as next_compact_ts for alignment.

What is changed and how does it work?

  1. Now, the schedule will try to do a routine compact every compact_interval if it is not behind last backup.
  2. Modified the calEndTs func so that we could record the next_compact_ts even if last_backup_ts exceeds fastCompactLimit
  3. Two new unit tests are added.

Code changes

  • Has Go code change
  • Has CI related scripts change

Tests

  • Unit test
  • E2E test
  • Manual test
  • No code

Side effects

  • Breaking backward compatibility
  • Other side effects:

Related changes

  • Need to cherry-pick to the release branch
  • Need to update the documentation

Release Notes

Please refer to Release Notes Language Style Guide before writing the release note.


@ti-chi-bot ti-chi-bot bot requested a review from shonge March 3, 2025 04:25
Copy link
Contributor

ti-chi-bot bot commented Mar 3, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign bornchanger for approval. 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

@ti-chi-bot ti-chi-bot bot added the size/L label Mar 3, 2025
@RidRisR
Copy link
Contributor Author

RidRisR commented Mar 3, 2025

/retest

@codecov-commenter
Copy link

codecov-commenter commented Mar 3, 2025

Codecov Report

Attention: Patch coverage is 0% with 50 lines in your changes missing coverage. Please review.

Project coverage is 45.63%. Comparing base (a16b2e8) to head (86d35d5).
Report is 27 commits behind head on master.

Current head 86d35d5 differs from pull request most recent head 384b311

Please upload reports for the commit 384b311 to get more accurate results.

❗ There is a different number of reports uploaded between BASE (a16b2e8) and HEAD (86d35d5). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (a16b2e8) HEAD (86d35d5)
unittest 1 0
Additional details and impacted files
@@             Coverage Diff             @@
##           master    #6103       +/-   ##
===========================================
- Coverage   57.19%   45.63%   -11.57%     
===========================================
  Files         259      223       -36     
  Lines       33233    32061     -1172     
===========================================
- Hits        19008    14631     -4377     
- Misses      12291    15588     +3297     
+ Partials     1934     1842       -92     
Flag Coverage Δ
e2e 45.63% <0.00%> (?)
unittest ?

@@ -2603,8 +2603,10 @@ type BackupScheduleStatus struct {
LogBackupStartTs *metav1.Time `json:"logBackupStartTs,omitempty"`
// LastBackupTime represents the last time the backup was successfully created.
LastBackupTime *metav1.Time `json:"lastBackupTime,omitempty"`
// LastCompactTs represents the endTs of the last compact
LastCompactTs *metav1.Time `json:"lastCompactTs,omitempty"`
// LastCompactProgress represents the endTs of the last compact
Copy link
Contributor

Choose a reason for hiding this comment

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

The comments of LastCompactProgress and LastCompactExecutionTs are same, and what's the difference between them?

@RidRisR RidRisR changed the title br: fix fast compact error br: fix fast compact bugs Mar 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants