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

domain: avoit to print too many log if the ddl job of runaway table is not finished #52283

Conversation

CabinfeverB
Copy link
Contributor

@CabinfeverB CabinfeverB commented Apr 1, 2024

…nished

What problem does this PR solve?

Issue Number: close #52048

Problem Summary:

What changed and how does it work?

Check List

Tests

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

before

tiup playground nightly --tag upgrade3 --db 3
ctrl + C
tiup playground nightly --tag upgrade3 --db 3
image

after

tiup playground v7.1.1 --tag upgrade --db 3
ctrl + C
tiup playground nightly --tag upgrade --db 3 --db.binpath=~/github/tidb/bin/tidb-server
image

  • No need to test
    • I checked and no code files have been changed.

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

…nished

Signed-off-by: Cabinfever_B <cabinfeveroier@gmail.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 Apr 1, 2024
Copy link

tiprow bot commented Apr 1, 2024

Hi @CabinfeverB. 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.

Signed-off-by: Cabinfever_B <cabinfeveroier@gmail.com>
@CabinfeverB
Copy link
Contributor Author

Copy link

codecov bot commented Apr 1, 2024

Codecov Report

Merging #52283 (839c8f7) into master (db0d581) will increase coverage by 0.2683%.
Report is 61 commits behind head on master.
The diff coverage is 68.8888%.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #52283        +/-   ##
================================================
+ Coverage   70.7391%   71.0074%   +0.2683%     
================================================
  Files          1491       1540        +49     
  Lines        440448     459566     +19118     
================================================
+ Hits         311569     326326     +14757     
- Misses       109378     113152      +3774     
- Partials      19501      20088       +587     
Flag Coverage Δ
integration 48.7765% <68.8888%> (?)

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

Components Coverage Δ
dumpling 53.9957% <ø> (ø)
parser ∅ <ø> (∅)
br 28.2434% <ø> (-17.5692%) ⬇️

Copy link
Contributor

@lance6716 lance6716 left a comment

Choose a reason for hiding this comment

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

How do you think we choose another way to fix, which is starting the runaway functionality after the bootstrap

pkg/domain/resourcegroup/runaway.go Outdated Show resolved Hide resolved
pkg/domain/resourcegroup/runaway.go Outdated Show resolved Hide resolved
pkg/domain/runaway.go Outdated Show resolved Hide resolved
for {
select {
case <-do.exit:
return
case <-runawayWatchSyncTicker.C:
err := do.updateNewAndDoneWatch()
if err != nil {
logutil.BgLogger().Warn("get runaway watch record failed", zap.Error(err))
if now := time.Now(); now.Sub(lastLogErrorTime) > runawayLoopLogErrorInterval {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it OK to use count here? For example, runawayLoopLogErrorCnt = 300

@CabinfeverB
Copy link
Contributor Author

How do you think we choose another way to fix, which is starting the runaway functionality after the bootstrap

Your idea is the best way, but I don't know much about the bootstrap process, so I'm not sure how to do. This is only a workaround.

Signed-off-by: Cabinfever_B <cabinfeveroier@gmail.com>
@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Apr 8, 2024
Copy link
Contributor

@glorv glorv left a comment

Choose a reason for hiding this comment

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

rest LGTM

return
}
}
count++
Copy link
Contributor

@glorv glorv Apr 8, 2024

Choose a reason for hiding this comment

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

move this line after the if block so the first time enter this path should also print the log

for {
select {
case <-do.exit:
return
case <-runawayWatchSyncTicker.C:
err := do.updateNewAndDoneWatch()
if err != nil {
logutil.BgLogger().Warn("get runaway watch record failed", zap.Error(err))
count++
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

Signed-off-by: Cabinfever_B <cabinfeveroier@gmail.com>
Copy link

ti-chi-bot bot commented Apr 9, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: glorv, lance6716

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 Apr 9, 2024
Copy link

ti-chi-bot bot commented Apr 9, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-04-08 07:03:56.922790306 +0000 UTC m=+859498.450330854: ☑️ agreed by lance6716.
  • 2024-04-09 06:40:02.050396031 +0000 UTC m=+944463.577936577: ☑️ agreed by glorv.

Copy link

tiprow bot commented Apr 9, 2024

@CabinfeverB: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
fast_test_tiprow 839c8f7 link true /test fast_test_tiprow

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.

@CabinfeverB
Copy link
Contributor Author

/test fast_test_tiprow

Copy link

ti-chi-bot bot commented Apr 9, 2024

@CabinfeverB: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

  • /test build
  • /test check-dev
  • /test check-dev2
  • /test mysql-test
  • /test pull-br-integration-test
  • /test pull-integration-ddl-test
  • /test pull-lightning-integration-test
  • /test pull-mysql-client-test
  • /test unit-test

The following commands are available to trigger optional jobs:

  • /test canary-notify-when-compatibility-sections-changed
  • /test pingcap/tidb/canary_ghpr_unit_test
  • /test pull-common-test
  • /test pull-e2e-test
  • /test pull-integration-common-test
  • /test pull-integration-copr-test
  • /test pull-integration-jdbc-test
  • /test pull-integration-mysql-test
  • /test pull-integration-nodejs-test
  • /test pull-sqllogic-test
  • /test pull-tiflash-test

Use /test all to run the following jobs that were automatically triggered:

  • pingcap/tidb/ghpr_build
  • pingcap/tidb/ghpr_check
  • pingcap/tidb/ghpr_check2
  • pingcap/tidb/ghpr_mysql_test
  • pingcap/tidb/ghpr_unit_test
  • pingcap/tidb/pull_integration_ddl_test
  • pingcap/tidb/pull_mysql_client_test

In response to this:

/test fast_test_tiprow

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

tiprow bot commented Apr 9, 2024

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

In response to this:

/test fast_test_tiprow

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.

@CabinfeverB
Copy link
Contributor Author

/test unit-test

Copy link

tiprow bot commented Apr 9, 2024

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

In response to this:

/test unit-test

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 156432d into pingcap:master Apr 9, 2024
22 of 23 checks passed
@nolouch nolouch added the needs-cherry-pick-release-8.1 Should cherry pick this PR to release-8.1 branch. label Jul 22, 2024
@nolouch
Copy link
Member

nolouch commented Jul 22, 2024

/run-cherry-picker

@ti-chi-bot
Copy link
Member

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

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-8.1 Should cherry pick this PR to release-8.1 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.

many runaway errors in log
6 participants