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

ddl: move insert job to table to job submitter #56542

Merged
merged 1 commit into from
Oct 11, 2024

Conversation

D3Hunter
Copy link
Contributor

What problem does this PR solve?

Issue Number: ref #54436

Problem Summary:

What changed and how does it work?

as title, they are only used there

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. only move code

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

@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Oct 10, 2024
Copy link

tiprow bot commented Oct 10, 2024

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

@D3Hunter D3Hunter mentioned this pull request Oct 10, 2024
54 tasks
Copy link

codecov bot commented Oct 10, 2024

Codecov Report

Attention: Patch coverage is 92.40506% with 6 lines in your changes missing coverage. Please review.

Project coverage is 76.0120%. Comparing base (22aa14a) to head (4baec0f).
Report is 17 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #56542        +/-   ##
================================================
+ Coverage   73.4138%   76.0120%   +2.5981%     
================================================
  Files          1626       1648        +22     
  Lines        449042     457012      +7970     
================================================
+ Hits         329659     347384     +17725     
+ Misses        99188      87969     -11219     
- Partials      20195      21659      +1464     
Flag Coverage Δ
integration 51.8031% <87.3417%> (?)
unit 72.4603% <92.4050%> (-0.0614%) ⬇️

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

Components Coverage Δ
dumpling 52.9478% <ø> (ø)
parser ∅ <ø> (∅)
br 62.9984% <ø> (+17.4182%) ⬆️

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

@GMHDBJD GMHDBJD 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

@@ -764,7 +666,7 @@ func updateDDLJob2Table(
if err != nil {
return err
}
sql := fmt.Sprintf(updateDDLJobSQL, util.WrapKey2String(b), job.ID)
sql := fmt.Sprintf("update mysql.tidb_ddl_job set job_meta = %s where job_id = %d", util.WrapKey2String(b), job.ID)
Copy link
Contributor

Choose a reason for hiding this comment

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

I think original updataDDLJobSQL variable would be better?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the reason I inline it is nearly all other place use string literal directly, and it's only used once

I do agree to define it as const if it's or will be used multiple times, but seems we won't

Copy link
Contributor

@GMHDBJD GMHDBJD 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 Oct 11, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: GMHDBJD, 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 Oct 11, 2024
Copy link

ti-chi-bot bot commented Oct 11, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-10-10 11:14:49.837831399 +0000 UTC m=+1131045.258044439: ☑️ agreed by lance6716.
  • 2024-10-11 08:15:38.535518378 +0000 UTC m=+1206693.955731390: ☑️ agreed by GMHDBJD.

@ti-chi-bot ti-chi-bot bot merged commit 1946f92 into pingcap:master Oct 11, 2024
23 of 25 checks passed
@D3Hunter D3Hunter deleted the restruture-job-submit branch October 11, 2024 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm release-note-none Denotes a PR that doesn't merit a release note. 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.

3 participants