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

*: Add a system table pipelined_dml_progress #60057

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ekexium
Copy link
Member

@ekexium ekexium commented Mar 13, 2025

What problem does this PR solve?

Issue Number: ref #50215

Problem Summary:

TiCDC and TiFlash have not achieved full compatibility with Pipelined DML. When using pipelined DML, TiFlash replicas and changefeed need to be removed temporarily until all locks written by Pipelined DML are resolved, to avoid OOM risks.

This PR provides an approch for users to identify whether there are locks written by PDML unresolved yet.

What changed and how does it work?

Requires tikv/client-go#1610

  1. Add a system table mysql.pipelined_dml_progress
  2. Let pipelined DML update progress in the table
  3. Let GC clear stale records in the table after resolving locks.

Example

insert into t2 select * from t;

select * from mysql.pipelined_dml_progress;

+--------------------+-----------------+----------------+------------------+---------------------+---------------------+
| start_ts           | involved_tables | status         | resolved_regions | create_time         | update_time         |
+--------------------+-----------------+----------------+------------------+---------------------+---------------------+
| 456614763033264130 | t2,t            | ResolvingLocks | 1                | 2025-03-13 14:24:48 | 2025-03-13 14:25:04 |
+--------------------+-----------------+----------------+------------------+---------------------+---------------------+

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.

Add a system table `mysql.pipelined_dml_progress`

@ti-chi-bot ti-chi-bot bot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Mar 13, 2025
Copy link

ti-chi-bot bot commented Mar 13, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from ekexium and additionally assign yudongusa for approval(Please ensuring that each of them provides their approval before proceeding). For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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 the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Mar 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant