Skip to content

Conversation

YangKeao
Copy link
Member

@YangKeao YangKeao commented Feb 8, 2025

What problem does this PR solve?

Issue Number: close #59347
Problem Summary:

Some of the TTL jobs are skipped for handled multiple times in one iteration. It caused the following effect:

  1. It'll take more time for CheckNotOwnedJob, checkFinishedJob, rescheduleJobs to handle all existing jobs.
  2. The last job may be handled for multiple times, like finished multiple times.

I think it's a minor issue as both of them don't block the TTL.

What changed and how does it work?

Iterate the jobs in the reverse order.

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.

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/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Feb 8, 2025
Copy link

codecov bot commented Feb 8, 2025

Codecov Report

Attention: Patch coverage is 93.75000% with 1 line in your changes missing coverage. Please review.

Project coverage is 73.5381%. Comparing base (ad2c9f4) to head (f333b59).
Report is 2 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #59348        +/-   ##
================================================
+ Coverage   73.0649%   73.5381%   +0.4731%     
================================================
  Files          1690       1690                
  Lines        467071     467166        +95     
================================================
+ Hits         341265     343545      +2280     
+ Misses       104848     102719      -2129     
+ Partials      20958      20902        -56     
Flag Coverage Δ
integration 42.9059% <12.5000%> (?)
unit 72.3071% <93.7500%> (+0.0424%) ⬆️

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

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

@YangKeao YangKeao added 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. needs-cherry-pick-release-8.1 Should cherry pick this PR to release-8.1 branch. needs-cherry-pick-release-8.5 Should cherry pick this PR to release-8.5 branch. labels Feb 8, 2025
@YangKeao
Copy link
Member Author

YangKeao commented Feb 8, 2025

I think it's a minor issue as both of them don't block the TTL.

NO. @lcwangchao told me it'll also flush all statistic data of a TTL job if a job is finished multiple times 🤦 .

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

ti-chi-bot bot commented Feb 8, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Defined2014, lcwangchao

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:
  • OWNERS [Defined2014,lcwangchao]

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 8, 2025
Copy link

ti-chi-bot bot commented Feb 8, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-02-08 13:41:19.25643815 +0000 UTC m=+104721.652660207: ☑️ agreed by lcwangchao.
  • 2025-02-08 13:54:31.289337522 +0000 UTC m=+105513.685559583: ☑️ agreed by Defined2014.

@ti-chi-bot ti-chi-bot bot merged commit b7aafa6 into pingcap:master Feb 8, 2025
24 checks passed
ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Feb 8, 2025
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-7.1: #59350.
But this PR has conflicts, please resolve them!

@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-7.5: #59351.
But this PR has conflicts, please resolve them!

@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-8.1: #59352.
But this PR has conflicts, please resolve them!

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Feb 8, 2025
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-8.5: #59353.
But this PR has conflicts, please resolve them!

ti-chi-bot bot pushed a commit that referenced this pull request Feb 11, 2025
ti-chi-bot bot pushed a commit that referenced this pull request Apr 15, 2025
zeminzhou pushed a commit to zeminzhou/tidb that referenced this pull request May 6, 2025
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-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. needs-cherry-pick-release-8.1 Should cherry pick this PR to release-8.1 branch. needs-cherry-pick-release-8.5 Should cherry pick this PR to release-8.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.

TTL job iteration will iterate the last item for multiple times
4 participants