-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
infoschema, util/stmtsummary: enhance statements_summary. #25031
Conversation
Enhance LRU cache, enable users access evicted key-value pair on Put() Signed-off-by: ClSlaid <[email protected]>
Release Note: enhanced LRU Cache some type fixes to cheat CI. Signed-off-by: ClSlaid <[email protected]>
typo fixes. Signed-off-by: ClSlaid <[email protected]>
enhance test on lru's Put() method. Signed-off-by: ClSlaid <[email protected]>
Add a function property in kvcache; Add a method to kvcache; Signed-off-by: ClSlaid <[email protected]>
Used Gofmt Signed-off-by: ClSlaid <[email protected]>
An initial commit, still cannot work properly. Signed-off-by: ClSlaid <[email protected]>
Catch up with PingCAP Signed-off-by: ClSlaid <[email protected]>
now we can see evicted count debug logging expressions not deleted... Signed-off-by: ClSlaid <[email protected]>
STATEMENTS_SUMMARY_EVICTED now able to use Test will be added in tomorrow. Signed-off-by: ClSlaid <[email protected]>
Purge logging code used for debugging. Signed-off-by: ClSlaid <[email protected]>
add test to evicted count, fix bugs in ssMap.other. Signed-off-by: ClSlaid <[email protected]>
Add test to stmtSummaryByDigestMap.ToEvictedCountDatum and stmtSummaryByDigestEvictedElement.ToEvictedCountDatum. Signed-off-by: ClSlaid <[email protected]>
make disable fail-point Signed-off-by: ClSlaid <[email protected]>
� Conflicts: � executor/infoschema_reader.go � infoschema/tables.go
Signed-off-by: ClSlaid <[email protected]>
focus on evicted count and purged unrelated contents. Signed-off-by: ClSlaid <[email protected]>
Signed-off-by: ClSlaid <[email protected]>
improve AddEvicted() from O(mn) to O(n) typo fixs Signed-off-by: ClSlaid <[email protected]>
Signed-off-by: ClSlaid <[email protected]>
Signed-off-by: ClSlaid <[email protected]>
/run-all-tests |
Signed-off-by: ClSlaid <[email protected]>
Signed-off-by: ClSlaid <[email protected]>
/run-all-tests |
/run-integration-br-test |
/run-integration-br-test |
/run-integration-br-test |
rows := make([][]types.Datum, 0, len(values)*historySize) | ||
for _, value := range values { | ||
records := value.(*stmtSummaryByDigest).toHistoryDatum(historySize, user, isSuper) | ||
rows = append(rows, records...) | ||
} | ||
|
||
otherDatum := other.toHistoryDatum(historySize) |
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.
So you always output other
even if there's no other
? Does MySQL do the same thing?
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.
NO, you find a bug here...
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.
After examination, such a situation will not happen.
There's always an other
that exists, you may refer to the only situation that other
contains no record.
You can take a look in stmtSummaryByDigestEvicted.toHistoryDatum()
.
If there is no record, no history record will be collected from the linked list inside other
, so that otherDatum
will be an empty list, nothing will be appended to the table.
/run-all-tests |
/run-all-tests |
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
/merge |
This pull request has been accepted and is ready to merge. Commit hash: ce03218
|
/run-integration-common-test |
@ClSlaid: Your PR was out of date, I have automatically updated it for you. At the same time I will also trigger all tests for you: /run-all-tests If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes. 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 ti-community-infra/tichi repository. |
/run-integration-common-test |
What problem does this PR solve?
Issue Number: close #24083
Problem Summary:
What is changed and how it works?
What's Changed:
before:
output:
statement_summary
table has a fixed size, some statement digests may get kicked by other digests, leading to lose of information.This pull request will append a special row to the
statement_summary
, which would sum up those statement digests got evicted fromstatement_summary
, so that all digests' information will be recorded.Following MySQL's behavior, the row's
DIGEST
andSCHEMA_NAME
match no record in the table, their value is<nil>
.<nil>
<nil>
Special rows corresponding to each interval will also be append to
statements_summary_history
table.How it Works:
Related changes
Check List
Tests
Side effects
Release note