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

ddl: Fix frequent schema GC under multi tenant #8248

Merged
merged 9 commits into from
Oct 27, 2023

Conversation

JaySon-Huang
Copy link
Contributor

@JaySon-Huang JaySon-Huang commented Oct 25, 2023

What problem does this PR solve?

Issue Number: close #8256

Problem Summary:

Previously, the last_gc_safepoint does not distinguish between keyspaces under multi tenant. Which make the Schema GC run repeadtly

What is changed and how it works?

  • Keep the last_gc_safepoint for each keyspace
  • Add some logging about the tombstone timestamp when a table get physically dropped in TiFlash

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

None

@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. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Oct 25, 2023
@JaySon-Huang JaySon-Huang force-pushed the fix_schema_sync_service branch from 50efb65 to ac486b8 Compare October 25, 2023 14:44
@ti-chi-bot ti-chi-bot bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Oct 25, 2023
@ti-chi-bot ti-chi-bot bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. do-not-merge/needs-linked-issue labels Oct 26, 2023
@JaySon-Huang
Copy link
Contributor Author

/run-all-tests

@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Oct 26, 2023
@ti-chi-bot ti-chi-bot bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Oct 26, 2023
@JaySon-Huang
Copy link
Contributor Author

/run-all-tests

@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Oct 27, 2023
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Oct 27, 2023

[LGTM Timeline notifier]

Timeline:

  • 2023-10-26 10:23:29.196329615 +0000 UTC m=+2516606.783439760: ☑️ agreed by JinheLin.
  • 2023-10-27 03:09:54.679178283 +0000 UTC m=+2576992.266288428: ☑️ agreed by hongyunyan.

@JaySon-Huang
Copy link
Contributor Author

/run-integration-test

@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Oct 27, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hongyunyan, JinheLin, Lloyd-Pottiger

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

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@JaySon-Huang
Copy link
Contributor Author

/run-unit-test

@JaySon-Huang
Copy link
Contributor Author

/run-all-tests

@JaySon-Huang
Copy link
Contributor Author

/run-unit-test

@ti-chi-bot
Copy link
Member

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

@JaySon-Huang JaySon-Huang deleted the fix_schema_sync_service branch October 27, 2023 07:14
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 <[email protected]>
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-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.

The schema GC run frequently under multi tenant
5 participants