tidb icon indicating copy to clipboard operation
tidb copied to clipboard

infoschema: remove foreign key table from tableInfoResident (#59879)

Open ti-chi-bot opened this issue 1 month ago • 5 comments

This is an automated cherry-pick of #59879

What problem does this PR solve?

Issue Number: close https://github.com/pingcap/tidb/issues/61191

Problem Summary: foreign key store in referredForeignKeys, not necessary store in tableInfoResident anymore.

What changed and how does it work?

remove foreign key from special attribute.

Check List

Tests

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

create tables(1/3 contain foreign key) before PR, QPS drop after create 3.42 Million tables image create tables(1/3 contain foreign key) after PR, QPS drop slower then before after create 8.89 Million tables 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

ti-chi-bot avatar Nov 26 '25 02:11 ti-chi-bot

Codecov Report

:white_check_mark: All modified and coverable lines are covered by tests. :warning: Please upload report for BASE (release-8.5@e4e814f). Learn more about missing BASE report.

Additional details and impacted files
@@               Coverage Diff                @@
##             release-8.5     #64676   +/-   ##
================================================
  Coverage               ?   78.6819%           
================================================
  Files                  ?       1694           
  Lines                  ?     499089           
  Branches               ?          0           
================================================
  Hits                   ?     392693           
  Misses                 ?      84464           
  Partials               ?      21932           
Flag Coverage Δ
integration 54.4987% <100.0000%> (?)
unit 73.1505% <100.0000%> (?)

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 70.7532% <0.0000%> (?)
:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov[bot] avatar Nov 26 '25 02:11 codecov[bot]

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Benjamin2037, GMHDBJD

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[bot] avatar Dec 11 '25 08:12 ti-chi-bot[bot]

[LGTM Timeline notifier]

Timeline:

  • 2025-11-26 04:49:52.065942289 +0000 UTC m=+678355.715136736: :ballot_box_with_check: agreed by Benjamin2037.
  • 2025-12-11 08:15:35.493713589 +0000 UTC m=+1115280.307491161: :ballot_box_with_check: agreed by GMHDBJD.

ti-chi-bot[bot] avatar Dec 11 '25 08:12 ti-chi-bot[bot]

/retest

GMHDBJD avatar Dec 11 '25 08:12 GMHDBJD

/retest

Benjamin2037 avatar Dec 12 '25 02:12 Benjamin2037

/test unit-test

EmmaDuDu avatar Dec 12 '25 12:12 EmmaDuDu

@EmmaDuDu: No presubmit jobs available for pingcap/[email protected]

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-sigs/prow repository.

tiprow[bot] avatar Dec 12 '25 12:12 tiprow[bot]

/ok-to-test

Benjamin2037 avatar Dec 15 '25 01:12 Benjamin2037

/retest

joechenrh avatar Dec 15 '25 08:12 joechenrh

/retest

Benjamin2037 avatar Dec 16 '25 01:12 Benjamin2037

/unhold

Benjamin2037 avatar Dec 16 '25 01:12 Benjamin2037

/retest

Benjamin2037 avatar Dec 16 '25 03:12 Benjamin2037

/retest

joechenrh avatar Dec 16 '25 03:12 joechenrh

/retest

EmmaDuDu avatar Dec 16 '25 07:12 EmmaDuDu

@ti-chi-bot: The following tests 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 1729924232ff0fce28f559afa737dc6187d0125d link true /test fast_test_tiprow_for_release
fast_test_tiprow_for_release 1729924232ff0fce28f559afa737dc6187d0125d link true /test fast_test_tiprow_for_release

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-sigs/prow repository. I understand the commands that are listed here.

tiprow[bot] avatar Dec 16 '25 07:12 tiprow[bot]