Skip to content

ddl: Fix corner case when multiple region creates one table simultaneously#8229

Merged
ti-chi-bot[bot] merged 24 commits intopingcap:masterfrom
hongyunyan:hongyunyan_fix_create_table
Oct 25, 2023
Merged

ddl: Fix corner case when multiple region creates one table simultaneously#8229
ti-chi-bot[bot] merged 24 commits intopingcap:masterfrom
hongyunyan:hongyunyan_fix_create_table

Conversation

@hongyunyan
Copy link
Contributor

@hongyunyan hongyunyan commented Oct 23, 2023

What problem does this PR solve?

Issue Number: close #8217

Problem Summary:

What is changed and how it works?

Fix the inner action order among create table to guaranteed atomicity.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

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

Fix a crash issue when multiple Regions of the same table are added to TiFlash concurrently

@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-linked-issue release-note-none Denotes a PR that doesn't merit a release note. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Oct 23, 2023
@hongyunyan
Copy link
Contributor Author

/run-all-tests

@hongyunyan
Copy link
Contributor Author

/run-unit-test

@ti-chi-bot ti-chi-bot bot added needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. and removed do-not-merge/needs-linked-issue labels Oct 23, 2023
@hongyunyan hongyunyan changed the title WIP: fix corner case when multiple region creates one table simultaneously Fix corner case when multiple region creates one table simultaneously Oct 23, 2023
@ti-chi-bot ti-chi-bot bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 23, 2023
@JaySon-Huang
Copy link
Contributor

/run-all-tests

@ti-chi-bot ti-chi-bot bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Oct 23, 2023
@JaySon-Huang
Copy link
Contributor

/run-all-tests

@JaySon-Huang JaySon-Huang changed the title Fix corner case when multiple region creates one table simultaneously ddl: Fix corner case when multiple region creates one table simultaneously Oct 23, 2023
Copy link
Contributor

@JaySon-Huang JaySon-Huang left a comment

Choose a reason for hiding this comment

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

And we should describe what problem is fixed in the "release note"

hongyunyan and others added 2 commits October 23, 2023 21:34
Co-authored-by: JaySon <tshent@qq.com>
Co-authored-by: JaySon <tshent@qq.com>
@ti-chi-bot ti-chi-bot bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-none Denotes a PR that doesn't merit a release note. labels Oct 23, 2023
@JaySon-Huang
Copy link
Contributor

/run-all-tests

Copy link
Contributor

@JaySon-Huang JaySon-Huang 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 ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Oct 24, 2023
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Oct 25, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JaySon-Huang, Lloyd-Pottiger

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:
  • OWNERS [JaySon-Huang,Lloyd-Pottiger]

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 Oct 25, 2023
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Oct 25, 2023

[LGTM Timeline notifier]

Timeline:

  • 2023-10-24 02:14:30.669930041 +0000 UTC m=+2314468.257040186: ☑️ agreed by JaySon-Huang.
  • 2023-10-25 01:44:35.187953789 +0000 UTC m=+2399072.775063934: ☑️ agreed by Lloyd-Pottiger.

@hongyunyan
Copy link
Contributor Author

/run-all-tests

@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-7.5: #8238.

ti-chi-bot pushed a commit to ti-chi-bot/tiflash that referenced this pull request Oct 25, 2023
ti-chi-bot bot pushed a commit that referenced this pull request Oct 27, 2023
guo-shaoge pushed a commit to guo-shaoge/tiflash that referenced this pull request Nov 29, 2023
…p#113)

* ddl: Fix frequent schema GC under multi tenant (pingcap#8248)

close pingcap#8256

* ddl: Fix corner case when multiple region creates one table simultaneously (pingcap#8229)

close pingcap#8217

---------

Co-authored-by: hongyunyan <649330952@qq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved lgtm needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TiFlash crashes when multiple regions of the same table received concurrently

4 participants