Skip to content

ddl: refine active-active corner cases | tidb-test=feature/active-active #65827

Merged
ti-chi-bot[bot] merged 4 commits intopingcap:feature/active-activefrom
xhebox:tidb-active-9
Jan 29, 2026
Merged

ddl: refine active-active corner cases | tidb-test=feature/active-active #65827
ti-chi-bot[bot] merged 4 commits intopingcap:feature/active-activefrom
xhebox:tidb-active-9

Conversation

@xhebox
Copy link
Contributor

@xhebox xhebox commented Jan 27, 2026

  1. show create table should append partdef after TTL and softdelete/active-active
  2. build active-active/softdelete columns earlier for user defined indexes
  3. _tidb_origin_ts should be unsigned
  4. allow user define softdelete column but still forbidden when softdelete info != null

What problem does this PR solve?

Issue Number: close #64281

Problem Summary:

  1. show create table should append partdef after TTL and
    softdelete/active-active
  2. build active-active/softdelete columns earlier for user defined
    indexes
  3. _tidb_origin_ts should be unsigned
  4. allow user define softdelete column but still forbidden when
    softdelete info != null

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

1. show create table should append partdef after TTL and
   softdelete/active-active
2. build active-active/softdelete columns earlier for user defined
   indexes
3. _tidb_origin_ts should be unsigned
4. allow user define softdelete column but still forbidden when
   softdelete info != null

Signed-off-by: xhe <xw897002528@gmail.com>
@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Jan 27, 2026
@tiprow
Copy link

tiprow bot commented Jan 27, 2026

Hi @xhebox. Thanks for your PR.

PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

I understand the commands that are listed here.

Details

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.

@codecov
Copy link

codecov bot commented Jan 27, 2026

Codecov Report

❌ Patch coverage is 77.87611% with 25 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (feature/active-active@a1a16a7). Learn more about missing BASE report.

Additional details and impacted files
@@                    Coverage Diff                     @@
##             feature/active-active     #65827   +/-   ##
==========================================================
  Coverage                         ?   71.8595%           
==========================================================
  Files                            ?       1851           
  Lines                            ?     503020           
  Branches                         ?          0           
==========================================================
  Hits                             ?     361468           
  Misses                           ?     117349           
  Partials                         ?      24203           
Flag Coverage Δ
integration 48.4508% <77.8761%> (?)
unit 65.6261% <54.8672%> (?)

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

Components Coverage Δ
dumpling 52.8700% <0.0000%> (?)
parser ∅ <0.0000%> (?)
br 60.4112% <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.

Copy link
Collaborator

@lcwangchao lcwangchao left a comment

Choose a reason for hiding this comment

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

rest LGTM

Signed-off-by: xhe <xw897002528@gmail.com>
// User-defined internal column must match expected type.
expected := model.NewExtraSoftDeleteTimeColInfo().FieldType
col := model.FindColumnInfo(tbInfo.Columns, model.ExtraSoftDeleteTimeName.L)
if col.FieldType.GetType() != expected.GetType() || col.FieldType.GetFlen() != expected.GetFlen() || col.FieldType.GetDecimal() != expected.GetDecimal() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

To apply checkInternalColumnFieldTypeMatch here?

Copy link
Collaborator

@lcwangchao lcwangchao left a comment

Choose a reason for hiding this comment

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

Rest LGTM

@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Jan 28, 2026
@lcwangchao lcwangchao changed the title ddl: refine active-active corner cases | tidb-test=feature/active-active tikv=feature/active-active ddl: refine active-active corner cases | tidb-test=feature/active-active Jan 28, 2026
@xhebox
Copy link
Contributor Author

xhebox commented Jan 28, 2026

/retest

@tiprow
Copy link

tiprow bot commented Jan 28, 2026

@xhebox: PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test.

Details

In response to this:

/retest

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.

Signed-off-by: xhe <xw897002528@gmail.com>
@xhebox
Copy link
Contributor Author

xhebox commented Jan 29, 2026

/retest

@tiprow
Copy link

tiprow bot commented Jan 29, 2026

@xhebox: PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test.

Details

In response to this:

/retest

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.

@xhebox
Copy link
Contributor Author

xhebox commented Jan 29, 2026

/ok-to-test

@ti-chi-bot ti-chi-bot bot added the ok-to-test Indicates a PR is ready to be tested. label Jan 29, 2026
Signed-off-by: xhe <xw897002528@gmail.com>
@xhebox
Copy link
Contributor Author

xhebox commented Jan 29, 2026

/retest

Copy link
Member

@YangKeao YangKeao left a comment

Choose a reason for hiding this comment

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

LGTM

@ti-chi-bot
Copy link

ti-chi-bot bot commented Jan 29, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: lcwangchao, YangKeao
Once this PR has been reviewed and has the lgtm label, please assign d3hunter 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 lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Jan 29, 2026
@ti-chi-bot
Copy link

ti-chi-bot bot commented Jan 29, 2026

[LGTM Timeline notifier]

Timeline:

  • 2026-01-28 12:42:06.451397438 +0000 UTC m=+1188954.065354284: ☑️ agreed by lcwangchao.
  • 2026-01-29 05:28:59.15305833 +0000 UTC m=+1249366.767015176: ☑️ agreed by YangKeao.

@ti-chi-bot ti-chi-bot bot merged commit f687417 into pingcap:feature/active-active Jan 29, 2026
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved lgtm ok-to-test Indicates a PR is ready to be tested. release-note-none Denotes a PR that doesn't merit a release note. 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.

4 participants