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

executor: add runtime information for the batch-point-get executor #18828

Merged
merged 6 commits into from
Jul 30, 2020

Conversation

crazycs520
Copy link
Contributor

Signed-off-by: crazycs520 crazycs520@gmail.com

What problem does this PR solve?

As the title said. related PR: #18666

Here is some example of explain analyze select * from t where a in (1, 2, 3);

Normally

+-------------------+---------+---------+------+---------------------+------------------------------------------------------------------+------------------------------+--------+------+
| id                | estRows | actRows | task | access object       | execution info                                                   | operator info                | memory | disk |
+-------------------+---------+---------+------+---------------------+------------------------------------------------------------------+------------------------------+--------+------+
| Batch_Point_Get_1 | 3.00    | 2       | root | table:t, index:a(a) | time:113.52µs, loops:2, BatchGet:{num_rpc:2, total_time:83.13µs} | keep order:false, desc:false | N/A    | N/A  |
+-------------------+---------+---------+------+---------------------+------------------------------------------------------------------+------------------------------+--------+------+

when meet lock:

+-------------------+---------+---------+------+---------------------+-----------------------------------------------------------------------------------------------------------------------------------+------------------------------+--------+------+
| id                | estRows | actRows | task | access object       | execution info                                                                                                                    | operator info                | memory | disk |
+-------------------+---------+---------+------+---------------------+-----------------------------------------------------------------------------------------------------------------------------------+------------------------------+--------+------+
| Batch_Point_Get_1 | 3.00    | 2       | root | table:t, index:a(a) | time:196.187329ms, loops:2, BatchGet:{num_rpc:22078, total_time:45.067042ms},ResolveLock:{num_rpc:22076, total_time:124.644857ms} | keep order:false, desc:false | N/A    | N/A  |
+-------------------+---------+---------+------+---------------------+-----------------------------------------------------------------------------------------------------------------------------------+------------------------------+--------+------+

when tikv restart:

+-------------------+---------+---------+------+---------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------------------------+--------+------+
| id                | estRows | actRows | task | access object       | execution info                                                                                                                                                             | operator info                | memory | disk |
+-------------------+---------+---------+------+---------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------------------------+--------+------+
| Batch_Point_Get_1 | 3.00    | 2       | root | table:t, index:a(a) | time:12.751231255s, loops:2, BatchGet:{num_rpc:13, total_time:10.713120148s},regionMiss_backoff:{num:11, total_time:2010 ms},tikvRPC_backoff:{num:11, total_time:10691 ms} | keep order:false, desc:false | N/A    | N/A  |
+-------------------+---------+---------+------+---------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------------------------+--------+------+

What is changed and how it works?

Related changes

  • Need to cherry-pick to the release branch

Check List

Tests

  • Unit test
  • Manual test

Side effects

  • Performance regression
    • Consumes more CPU
    • Consumes more MEM

Release note

  • Add runtime information for the batch-point-get executor

Signed-off-by: crazycs520 <crazycs520@gmail.com>
@crazycs520 crazycs520 added the sig/execution SIG execution label Jul 28, 2020
@crazycs520 crazycs520 requested review from a team as code owners July 28, 2020 09:31
@crazycs520 crazycs520 requested review from qw4990 and XuHuaiyu and removed request for a team July 28, 2020 09:31
@crazycs520
Copy link
Contributor Author

/run-all-tests

Copy link
Member

@wjhuang2016 wjhuang2016 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-srebot ti-srebot added the status/LGT1 Indicates that a PR has LGTM 1. label Jul 30, 2020
Copy link
Contributor

@qw4990 qw4990 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-srebot ti-srebot removed the status/LGT1 Indicates that a PR has LGTM 1. label Jul 30, 2020
@ti-srebot ti-srebot added the status/LGT2 Indicates that a PR has LGTM 2. label Jul 30, 2020
@qw4990
Copy link
Contributor

qw4990 commented Jul 30, 2020

/merge

@ti-srebot ti-srebot added the status/can-merge Indicates a PR has been approved by a committer. label Jul 30, 2020
@ti-srebot
Copy link
Contributor

/run-all-tests

@codecov
Copy link

codecov bot commented Jul 30, 2020

Codecov Report

Merging #18828 into master will not change coverage.
The diff coverage is n/a.

@@             Coverage Diff             @@
##             master     #18828   +/-   ##
===========================================
  Coverage   79.1593%   79.1593%           
===========================================
  Files           547        547           
  Lines        147855     147855           
===========================================
  Hits         117041     117041           
  Misses        21347      21347           
  Partials       9467       9467           

@ti-srebot
Copy link
Contributor

/run-all-tests

@ti-srebot
Copy link
Contributor

@crazycs520 merge failed.

@crazycs520 crazycs520 merged commit c397584 into pingcap:master Jul 30, 2020
ti-srebot pushed a commit to ti-srebot/tidb that referenced this pull request Jul 30, 2020
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
@ti-srebot
Copy link
Contributor

cherry pick to release-4.0 in PR #18892

crazycs520 added a commit to ti-srebot/tidb that referenced this pull request Jul 31, 2020
ti-srebot added a commit that referenced this pull request Aug 3, 2020
…18828) (#18892)

Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
Signed-off-by: crazycs520 <crazycs520@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sig/execution SIG execution status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants