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: added more info for slow regions in log backup advancer #51137

Merged
merged 2 commits into from
Feb 20, 2024

Conversation

YuJuncen
Copy link
Contributor

What problem does this PR solve?

Issue Number: close #51046

Problem Summary:
It is painful for debugging slow regions in log backup for now. Exactly when there are many TiKV nodes in the cluster: we only have a range but know nothing about which region this key belongs to.
Also we must pick the TiDB log (which isn't always easily accessible.) for such information.

What changed and how does it work?

This PR added two new series to the log backup advancer, which presents the current slowest region's leader location and its region id.
Also we will append more detailed hints about the slowest range.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
    A simple log:
    CleanShot 2024-02-19 at 14 20 11@2x
  • 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.

None

Signed-off-by: Yu Juncen <[email protected]>
Signed-off-by: Yu Juncen <[email protected]>
@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 Feb 19, 2024
Copy link

tiprow bot commented Feb 19, 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/test-infra repository.

Copy link

codecov bot commented Feb 19, 2024

Codecov Report

Merging #51137 (1771bb7) into master (a465300) will decrease coverage by 16.1352%.
Report is 8 commits behind head on master.
The diff coverage is 67.5000%.

Additional details and impacted files
@@                Coverage Diff                @@
##             master     #51137         +/-   ##
=================================================
- Coverage   70.6268%   54.4916%   -16.1352%     
=================================================
  Files          1467       1576        +109     
  Lines        434809     603562     +168753     
=================================================
+ Hits         307092     328891      +21799     
- Misses       108517     252105     +143588     
- Partials      19200      22566       +3366     
Flag Coverage Δ
integration 36.6107% <2.5000%> (?)
unit 70.4018% <67.5000%> (-0.0301%) ⬇️

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

Components Coverage Δ
dumpling 53.9957% <ø> (-0.0313%) ⬇️
parser ∅ <ø> (∅)
br 51.1621% <67.5000%> (+5.2936%) ⬆️

// Always fetch the hint and update the metrics.
hint := c.fetchRegionHint(sctx, minValue.Key.StartKey)
logger := log.Debug
if minValue.Value < thresholdTso {
Copy link
Contributor

Choose a reason for hiding this comment

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

how about using <=?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Given the scale of TSO is millisecond, I guess the difference is minor between <= and <? 🤔

@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Feb 19, 2024
Copy link

ti-chi-bot bot commented Feb 20, 2024

[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 Feb 20, 2024
Copy link

ti-chi-bot bot commented Feb 20, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-02-19 07:48:54.818527376 +0000 UTC m=+257023.566150522: ☑️ agreed by Leavrth.
  • 2024-02-20 02:24:41.665973441 +0000 UTC m=+323970.413596537: ☑️ agreed by BornChanger.

@BornChanger
Copy link
Contributor

/retest

Copy link

tiprow bot commented Feb 20, 2024

@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 merged commit 58e3735 into pingcap:master Feb 20, 2024
35 of 43 checks passed
@YuJuncen YuJuncen added 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. labels Feb 20, 2024
@YuJuncen
Copy link
Contributor Author

/run-cherry-picker

@ti-chi-bot
Copy link
Member

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

@ti-chi-bot
Copy link
Member

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

@ti-chi-bot
Copy link
Member

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

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-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.

log_backup: add some hint about the slow region
4 participants