Skip to content

Modernize dm (excluding dm/pkg)#12719

Open
dveeden wants to merge 2 commits into
pingcap:masterfrom
dveeden:modern_dm
Open

Modernize dm (excluding dm/pkg)#12719
dveeden wants to merge 2 commits into
pingcap:masterfrom
dveeden:modern_dm

Conversation

@dveeden

@dveeden dveeden commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

What problem does this PR solve?

Issue Number: ref #12691

What is changed and how it works?

Check List

Tests

  • Manual test (add detailed scripts or steps below)

Questions

Will it cause performance regression or break compatibility?
Do you need to update user documentation, design documentation or monitoring documentation?

Release note

None

@ti-chi-bot ti-chi-bot Bot added the release-note-none Denotes a PR that doesn't merit a release note. label Jun 16, 2026
@ti-chi-bot

ti-chi-bot Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

[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 assign benjamin2037, yudongusa for approval. For more information see the Code Review Process.
Please ensure that each of them provides their approval before proceeding.

The full list of commands accepted by this bot can be found 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 area/dm Issues or PRs related to DM. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jun 16, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request modernizes the codebase by adopting Go 1.21 and 1.22 features, such as replacing interface{} with any, using for range over integers, utilizing maps.Copy and slices.Contains, and leveraging fmt.Appendf. However, a critical issue was identified across multiple files where standard sync.WaitGroup usages were incorrectly refactored to use a non-existent Go method (e.g., wg.Go(func() { ... })). This will result in compilation failures, and these changes must be reverted to the standard wg.Add(1) and go func() pattern.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread dm/config/subtask_test.go
Comment thread dm/config/subtask_test.go
Comment thread dm/config/subtask_test.go
Comment thread dm/config/subtask_test.go
Comment thread dm/config/subtask_test.go
Comment thread dm/master/shardddl/optimist.go
Comment thread dm/master/shardddl/pessimist.go
Comment thread dm/relay/binlog_writer.go
Comment thread dm/syncer/data_validator.go
Comment thread dm/worker/relay.go
@dveeden

dveeden commented Jun 16, 2026

Copy link
Copy Markdown
Contributor Author

/cc @kennytm @GMHDBJD

@ti-chi-bot ti-chi-bot Bot requested review from GMHDBJD and kennytm June 16, 2026 07:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/dm Issues or PRs related to DM. release-note-none Denotes a PR that doesn't merit a release note. 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.

1 participant