Skip to content

ddl,tables: only write the index when it meets partial index condition (#62762)#65700

Merged
ti-chi-bot[bot] merged 8 commits into
pingcap:release-8.5-20260116-v8.5.5from
YangKeao:partial-index-cherry-pick-3
Jan 29, 2026
Merged

ddl,tables: only write the index when it meets partial index condition (#62762)#65700
ti-chi-bot[bot] merged 8 commits into
pingcap:release-8.5-20260116-v8.5.5from
YangKeao:partial-index-cherry-pick-3

Conversation

@YangKeao
Copy link
Copy Markdown
Member

@YangKeao YangKeao commented Jan 21, 2026

This is a cherry-pick for partial index and some related bug fixes:

What problem does this PR solve?

Issue Number: close #62761

Problem Summary:

What changed and how does it work?

  1. Modify the tables.index to parse/store the expression of partialConditionExpression.
  2. Add a MeetPartialCondition to check whether it'll meet the condition.
  3. Add some tests about the DML during the DDL on the same table.
  4. Modify the row count of admin show ddl job from the added count to the scanned count.
  5. Support admin check table for partial index.

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.

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. sig/planner SIG: Planner size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jan 21, 2026
@ti-chi-bot ti-chi-bot Bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 21, 2026
@YangKeao YangKeao force-pushed the partial-index-cherry-pick-3 branch from cacc741 to 0bde887 Compare January 21, 2026 09:47
@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 21, 2026

Codecov Report

❌ Patch coverage is 72.33294% with 236 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (release-8.5-20260116-v8.5.5@1fa258b). Learn more about missing BASE report.

Additional details and impacted files
@@                       Coverage Diff                        @@
##             release-8.5-20260116-v8.5.5     #65700   +/-   ##
================================================================
  Coverage                               ?   73.1767%           
================================================================
  Files                                  ?       1684           
  Lines                                  ?     470233           
  Branches                               ?          0           
================================================================
  Hits                                   ?     344101           
  Misses                                 ?     103227           
  Partials                               ?      22905           
Flag Coverage Δ
integration 50.9613% <63.6576%> (?)
unit 64.8615% <47.1277%> (?)

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

Components Coverage Δ
dumpling 52.9278% <0.0000%> (?)
parser ∅ <0.0000%> (?)
br 63.9821% <0.0000%> (?)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@YangKeao YangKeao force-pushed the partial-index-cherry-pick-3 branch 3 times, most recently from a57b76d to 0acba00 Compare January 22, 2026 07:05
@YangKeao YangKeao force-pushed the partial-index-cherry-pick-3 branch 2 times, most recently from 9f03e4d to 18469a8 Compare January 22, 2026 11:03
winoros
winoros previously approved these changes Jan 22, 2026
@ti-chi-bot ti-chi-bot Bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Jan 22, 2026
@YangKeao YangKeao force-pushed the partial-index-cherry-pick-3 branch from 18469a8 to d16fc20 Compare January 26, 2026 07:45
@YangKeao YangKeao force-pushed the partial-index-cherry-pick-3 branch 8 times, most recently from 3326ab0 to 6f3324e Compare January 26, 2026 17:21
@ti-chi-bot
Copy link
Copy Markdown

ti-chi-bot Bot commented Jan 27, 2026

[LGTM Timeline notifier]

Timeline:

  • 2026-01-22 14:54:45.629372454 +0000 UTC m=+678513.243329320: ☑️ agreed by winoros.
  • 2026-01-27 08:06:08.67291877 +0000 UTC m=+1085996.286875616: ☑️ agreed by wjhuang2016.

@YangKeao YangKeao force-pushed the partial-index-cherry-pick-3 branch 3 times, most recently from 525c09e to a09092b Compare January 27, 2026 09:05
@YangKeao YangKeao force-pushed the partial-index-cherry-pick-3 branch from a09092b to a7a283a Compare January 27, 2026 12:21
wjhuang2016
wjhuang2016 previously approved these changes Jan 28, 2026
winoros
winoros previously approved these changes Jan 28, 2026
Leavrth
Leavrth previously approved these changes Jan 28, 2026
tangenta
tangenta previously approved these changes Jan 29, 2026
@ti-chi-bot ti-chi-bot Bot added the approved label Jan 29, 2026
@YangKeao YangKeao dismissed stale reviews from tangenta, Leavrth, winoros, and wjhuang2016 via b6079e8 January 29, 2026 11:56
@ti-chi-bot ti-chi-bot Bot removed the approved label Jan 29, 2026
@ti-chi-bot
Copy link
Copy Markdown

ti-chi-bot Bot commented Jan 29, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Leavrth, tangenta, winoros, wjhuang2016, yudongusa

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details 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 Jan 29, 2026
@ti-chi-bot ti-chi-bot Bot merged commit db87a51 into pingcap:release-8.5-20260116-v8.5.5 Jan 29, 2026
20 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-none Denotes a PR that doesn't merit a release note. sig/planner SIG: Planner size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants