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: Add upgrade progress information to the logs #58246

Merged
merged 5 commits into from
Dec 20, 2024

Conversation

ystaticy
Copy link
Contributor

@ystaticy ystaticy commented Dec 13, 2024

What problem does this PR solve?

Issue Number: ref #58255

Problem Summary:

What changed and how does it work?

Print progress information during the upgrade process:

[2024/12/13 18:13:31.057 +08:00] [INFO] [bootstrap.go:1565] ["upgrade in progress, a version has just been completed or be skipped."] [keyspaceName=ks1] [old-start-version=182] [in-progress-version=upgradeToVer210] [latest-version=239]

Check List

Tests

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

Upgrading TiDB from a lower version to a higher version, with upgrade version update. The following logs can be observed during the process:

[2024/12/13 18:13:31.057 +08:00] [INFO] [bootstrap.go:1565] ["upgrade in progress, a version has just been completed or be skipped."] [keyspaceName=ks1] [old-start-version=182] [in-progress-version=upgradeToVer210] [latest-version=239]

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.

Add upgrade progress information to the logs

@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-linked-issue do-not-merge/needs-tests-checked release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Dec 13, 2024
Copy link

tiprow bot commented Dec 13, 2024

Hi @ystaticy. 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 Dec 13, 2024

Codecov Report

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

Project coverage is 73.8558%. Comparing base (aa19d3f) to head (2787daf).
Report is 26 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #58246        +/-   ##
================================================
+ Coverage   73.1646%   73.8558%   +0.6911%     
================================================
  Files          1680       1681         +1     
  Lines        462997     466620      +3623     
================================================
+ Hits         338750     344626      +5876     
+ Misses       103434     101254      -2180     
+ Partials      20813      20740        -73     
Flag Coverage Δ
integration 43.3359% <0.0000%> (?)
unit 72.5602% <60.8695%> (+0.2652%) ⬆️

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

Components Coverage Δ
dumpling 52.6910% <ø> (ø)
parser ∅ <ø> (∅)
br 46.0561% <ø> (+0.0481%) ⬆️

@ti-chi-bot ti-chi-bot bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed do-not-merge/needs-linked-issue do-not-merge/needs-tests-checked release-note-none Denotes a PR that doesn't merit a release note. labels Dec 13, 2024
Copy link
Contributor

@zimulala zimulala left a comment

Choose a reason for hiding this comment

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

LGTM

@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Dec 16, 2024
@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Dec 16, 2024
Copy link

ti-chi-bot bot commented Dec 16, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-12-16 03:15:18.523114788 +0000 UTC m=+840308.611917316: ☑️ agreed by zimulala.
  • 2024-12-16 03:30:30.038896817 +0000 UTC m=+841220.127699356: ☑️ agreed by djshow832.

pkg/session/bootstrap.go Outdated Show resolved Hide resolved
Copy link

@yudongusa yudongusa left a comment

Choose a reason for hiding this comment

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

@ystaticy any test to cover this change?

Signed-off-by: ystaticy <[email protected]>
@ti-chi-bot ti-chi-bot bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Dec 18, 2024
@ystaticy
Copy link
Contributor Author

@ystaticy any test to cover this change?

@yudongusa I added a UT case,PTAL~

Copy link
Member

@bb7133 bb7133 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

ti-chi-bot bot commented Dec 20, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bb7133, benmeadowcroft, djshow832, tiancaiamao, zimulala

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 the approved label Dec 20, 2024
@ti-chi-bot ti-chi-bot bot merged commit 3e28938 into pingcap:master Dec 20, 2024
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm release-note Denotes a PR that will be considered when it comes time to generate release notes. 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.

7 participants