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

*: bypass order by clause for fast point get plan #50204

Merged
merged 4 commits into from
Jan 12, 2024

Conversation

jackysp
Copy link
Member

@jackysp jackysp commented Jan 8, 2024

What problem does this PR solve?

Issue Number: close #49920

Problem Summary:

What changed and how does it work?

It's better to resolve order by clause, but it will make some duplicated code.

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

@ti-chi-bot ti-chi-bot bot added needs-cherry-pick-release-5.4 Should cherry pick this PR to release-5.4 branch. release-note-none Denotes a PR that doesn't merit a release note. needs-cherry-pick-release-6.1 Should cherry pick this PR to release-6.1 branch. needs-cherry-pick-release-6.5 Should cherry pick this PR to release-6.5 branch. needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jan 8, 2024
Copy link

codecov bot commented Jan 8, 2024

Codecov Report

Merging #50204 (dadca67) into master (095227d) will decrease coverage by 14.6136%.
The diff coverage is 100.0000%.

Additional details and impacted files
@@                Coverage Diff                @@
##             master     #50204         +/-   ##
=================================================
- Coverage   70.0083%   55.3948%   -14.6136%     
=================================================
  Files          1444       1555        +111     
  Lines        419997     586921     +166924     
=================================================
+ Hits         294033     325124      +31091     
- Misses       105634     239112     +133478     
- Partials      20330      22685       +2355     
Flag Coverage Δ
integration 36.5494% <100.0000%> (?)
unit 70.0026% <100.0000%> (-0.0058%) ⬇️

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

Components Coverage Δ
dumpling 54.0269% <ø> (ø)
parser ∅ <ø> (∅)
br 55.4873% <ø> (+5.8174%) ⬆️

@hawkingrei
Copy link
Member

/retest

@jackysp
Copy link
Member Author

jackysp commented Jan 9, 2024

/retest

@jackysp jackysp changed the title *: bypass order by clause for point get plan *: bypass order by clause for fast point get plan Jan 10, 2024
@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Jan 11, 2024
Copy link

ti-chi-bot bot commented Jan 12, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: qw4990, winoros

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

@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Jan 12, 2024
Copy link

ti-chi-bot bot commented Jan 12, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-01-11 18:44:29.065936267 +0000 UTC m=+555258.650189953: ☑️ agreed by winoros.
  • 2024-01-12 06:17:02.212619654 +0000 UTC m=+596811.796873338: ☑️ agreed by qw4990.

Signed-off-by: Jack Yu <jackysp@gmail.com>
Signed-off-by: Jack Yu <jackysp@gmail.com>
Signed-off-by: Jack Yu <jackysp@gmail.com>
Signed-off-by: Jack Yu <jackysp@gmail.com>
@ti-chi-bot ti-chi-bot bot merged commit c1eb8ab into pingcap:master Jan 12, 2024
22 checks passed
ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Jan 12, 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-6.5: #50364.

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Jan 12, 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.1: #50365.

@ti-chi-bot
Copy link
Member

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

@ti-chi-bot
Copy link
Member

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

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Jan 12, 2024
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Jan 12, 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-6.1: #50368.

@you06
Copy link
Contributor

you06 commented Mar 11, 2024

This PR also fixed the invalid start TS.

/* init */ drop table if exists account;
-- init >> 0 rows affected
/* init */ create table account (id varchar(255) primary key, val varchar(255));
-- init >> 0 rows affected
/* t1 */ begin;
-- t1 >> 0 rows affected
/* t1 */ prepare stmt1 from 'select * from account where id = ? order by id limit 1 for update';
-- t1 >> 0 rows affected
/* t1 */ set @a = "a";
-- t1 >> 0 rows affected
/* t1 */ execute stmt1 using @a;
-- t1 >> 0 rows affected
/* t1 */ commit;
-- t1 >> 0 rows affected
/* t1 */ execute stmt1 using @a;
-- t1 >> E1105: try to commit with invalid txnStartTS: 18446744073709551615

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-5.4 Should cherry pick this PR to release-5.4 branch. needs-cherry-pick-release-6.1 Should cherry pick this PR to release-6.1 branch. needs-cherry-pick-release-6.5 Should cherry pick this PR to release-6.5 branch. needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. 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/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PointGetPlan needs to resolve order by clause
6 participants