-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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: make SLOW_QUERY support query slow log at any time #14840
Conversation
Signed-off-by: crazycs <crazycs520@gmail.com>
Signed-off-by: crazycs <crazycs520@gmail.com>
Signed-off-by: crazycs <crazycs520@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Already rename max_num
to maxLineNum
.
why not just seek cursor to a big value and readLine from up to the end?
Because the big value
was hard to define. The size plan
and query
is unpredictable.
But the max line is certain, currently, 1 slow log won't more than 128 line.
Signed-off-by: crazycs <crazycs520@gmail.com>
Signed-off-by: crazycs <crazycs520@gmail.com>
Signed-off-by: crazycs <crazycs520@gmail.com>
Signed-off-by: crazycs <crazycs520@gmail.com>
…into slow-query-more
Dear contributor, the first Performance challenge program has been closed. But you can still contribute to this issue and we appreciate your contribution. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rest LGTM
Signed-off-by: crazycs <crazycs520@gmail.com>
Co-Authored-By: Arenatlx <ailinsilence4@gmail.com>
Co-Authored-By: Arenatlx <ailinsilence4@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
/run-all-tests |
What problem does this PR solve?
This PR is step 2 of #14748.
SLOW_QUERY
support queryslow-log
at any time.What is changed and how it works?
Since both
slow-log
files have the same name prefix, then we can know which file is slow-log.But we can't always parse the all slow-log files, It will too slow. Since TiDB already has the
memtable_predicate_extracctor
, We can get the query time range, and then locate slow-log files to parse based on the time range.Check List
Tests
Code changes
Side effects
Related changes
Release note