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/ingest: set minCommitTS when detect remote duplicate keys #55588

Merged
merged 8 commits into from
Sep 5, 2024

Conversation

tangenta
Copy link
Contributor

@tangenta tangenta commented Aug 22, 2024

What problem does this PR solve?

Issue Number: close #55587

Problem Summary:

#55587 (comment)

What changed and how does it work?

Set minCommitTS when detect remote duplicate keys

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
    After this PR:
    mysql> set @@global.tidb_gc_life_time = '100m';
    Query OK, 0 rows affected (0.01 sec)
    
    mysql> drop table if exists t;
    Query OK, 0 rows affected, 1 warning (0.00 sec)
    
    mysql> create table t (a int, b int);
    Query OK, 0 rows affected (0.10 sec)
    
    mysql> insert into t values (1, 1);
    Query OK, 1 row affected (0.01 sec)
    
    mysql> select now();
    +---------------------+
    | now()               |
    +---------------------+
    | 2024-09-05 17:31:47 |
    +---------------------+
    1 row in set (0.00 sec)
    
    mysql> alter table t add index idx(b);
    Query OK, 0 rows affected (2.20 sec)
    
    mysql> flashback cluster to timestamp '2024-09-05 17:31:47';
    Query OK, 0 rows affected (2.22 sec)
    
    mysql> alter table t add unique index idx(b);
    Query OK, 0 rows affected (2.24 sec)
    Because using flashback cluster in real tikv test is very unstable, I test it manually. There is also an integration test on endless.
  • 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

@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-triage-completed release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Aug 22, 2024
Copy link

tiprow bot commented Aug 22, 2024

Hi @tangenta. 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.

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.

Copy link

codecov bot commented Aug 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 56.9702%. Comparing base (e9124dd) to head (268c8f5).
Report is 125 commits behind head on master.

Additional details and impacted files
@@                Coverage Diff                @@
##             master     #55588         +/-   ##
=================================================
- Coverage   72.8514%   56.9702%   -15.8813%     
=================================================
  Files          1601       1759        +158     
  Lines        445302     642911     +197609     
=================================================
+ Hits         324409     366268      +41859     
- Misses       100894     251594     +150700     
- Partials      19999      25049       +5050     
Flag Coverage Δ
integration 39.4882% <94.4444%> (?)
unit 71.9995% <33.3333%> (+0.0382%) ⬆️

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

Components Coverage Δ
dumpling 52.9567% <ø> (ø)
parser ∅ <ø> (∅)
br 62.3995% <ø> (+16.6228%) ⬆️

@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Sep 3, 2024
@ti-chi-bot ti-chi-bot bot added approved lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Sep 3, 2024
Copy link

ti-chi-bot bot commented Sep 3, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-09-03 04:32:41.769139665 +0000 UTC m=+332486.287192582: ☑️ agreed by lance6716.
  • 2024-09-03 05:50:06.393900488 +0000 UTC m=+337130.911953413: ☑️ agreed by wjhuang2016.

@lance6716
Copy link
Contributor

/retest

Copy link

tiprow bot commented Sep 3, 2024

@lance6716: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

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.

@lance6716
Copy link
Contributor

/retest

Copy link

tiprow bot commented Sep 3, 2024

@lance6716: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

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.

@lance6716
Copy link
Contributor

/retest

Copy link

tiprow bot commented Sep 5, 2024

@lance6716: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

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.

Copy link

ti-chi-bot bot commented Sep 5, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lance6716, wjhuang2016

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:

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

@tangenta
Copy link
Contributor Author

tangenta commented Sep 5, 2024

/retest

Copy link

tiprow bot commented Sep 5, 2024

@tangenta: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

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.

@tangenta
Copy link
Contributor Author

tangenta commented Sep 5, 2024

/retest

Copy link

tiprow bot commented Sep 5, 2024

@tangenta: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

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.

@ti-chi-bot ti-chi-bot bot merged commit c403cd5 into pingcap:master Sep 5, 2024
23 checks passed
breezewish added a commit to breezewish/tidb that referenced this pull request Sep 8, 2024
* origin/master: (33 commits)
  build(deps): bump github.com/prometheus/common from 0.55.0 to 0.57.0 (pingcap#55762)
  build(deps): bump golang.org/x/sys from 0.24.0 to 0.25.0 (pingcap#55894)
  planner: fix incorrect estRows with global index and json column (pingcap#55842)
  ddl, stat: switch to new struct for add/truncate/drop partition (pingcap#55893)
  planner: hide instance plan cache eviction log if no plan is evicted (pingcap#55918)
  expression: support tidb encode key function (pingcap#51678)
  planner: fix incorrect maintenance of `handleColHelper` for recursive CTE (pingcap#55732)
  executor: some code refine of hash join v2 (pingcap#55887)
  infoschema, meta: fix wrong auto id after `rename table` (pingcap#55847)
  ddl/ingest: set `minCommitTS` when detect remote duplicate keys (pingcap#55588)
  planner: move index advisor into the kernel (pingcap#55874)
  ddl, stats: switch to new struct for create/truncate table (pingcap#55811)
  executor: avoid new small objects in probe stage of hash join v2 (pingcap#55855)
  *: Add tidbCPU/tikvCPU into system tables (pingcap#55455)
  ddl: use static contexts in `NewReorgCopContext` (pingcap#55823)
  executor: fix index out of range bug in hash join v2 (pingcap#55864)
  executor: record index usage for the clustered primary keys (pingcap#55602)
  domain: load all non-public tables into infoschema (pingcap#55142)
  test: fix unstable TestShowViewPriv (pingcap#55868)
  ttl: add `varbinary` case for `TestSplitTTLScanRangesWithBytes` (pingcap#55863)
  ...
@Benjamin2037 Benjamin2037 added the needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. label Sep 24, 2024
ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Sep 24, 2024
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@ti-chi-bot
Copy link
Member

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

@ti-chi-bot ti-chi-bot bot removed the needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. label Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot add unique index after flashback cluster
5 participants