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) #18892

Merged
merged 5 commits into from
Aug 3, 2020

Conversation

ti-srebot
Copy link
Contributor

cherry-pick #18828 to release-4.0


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: ti-srebot <ti-srebot@pingcap.com>
@ti-srebot
Copy link
Contributor Author

/run-all-tests

Signed-off-by: crazycs520 <crazycs520@gmail.com>
@crazycs520
Copy link
Contributor

/rebuild

@crazycs520
Copy link
Contributor

/run-unit-test

1 similar comment
@crazycs520
Copy link
Contributor

/run-unit-test

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 added the status/LGT1 Indicates that a PR has LGTM 1. label Aug 3, 2020
@crazycs520
Copy link
Contributor

/run-all-tests

Copy link
Contributor

@tangenta tangenta 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 status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Aug 3, 2020
@crazycs520
Copy link
Contributor

/run-all-tests

Copy link
Member

@zz-jason zz-jason 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 status/LGT3 The PR has already had 3 LGTM. and removed status/LGT2 Indicates that a PR has LGTM 2. labels Aug 3, 2020
@zz-jason
Copy link
Member

zz-jason commented Aug 3, 2020

/merge

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

/run-all-tests

@ti-srebot ti-srebot merged commit 990fd2e into pingcap:release-4.0 Aug 3, 2020
@crazycs520 crazycs520 deleted the release-4.0-c397584065be branch August 3, 2020 06:18
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/LGT3 The PR has already had 3 LGTM. type/4.0-cherry-pick
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants