-
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
stmtsummary: add persistence implementation #40814
Merged
Merged
Changes from 42 commits
Commits
Show all changes
54 commits
Select commit
Hold shift + click to select a range
5828537
stmtsummary: add persistent v2 implementation
mornyx 70b3bd5
Merge branch 'master' into stmtsummary
mornyx 8308dc2
resolve comments
mornyx 85c5f0d
Merge branch 'master' into stmtsummary
mornyx 2bc61d8
update bazel file
mornyx 4659ce8
fix stmtsummary global var value
mornyx 3302e54
use BoolToOnOff
mornyx e01dd47
optimize time window processing
mornyx 8c85d12
Merge branch 'master' into stmtsummary
mornyx 4a6ba00
defaultRotateCheckInterval 5s -> 1s
mornyx e9e6fa0
fix linting
mornyx 9bf28ff
fix explain info
mornyx 4ca4405
unify
zhongzc a64f1b4
Merge remote-tracking branch 'mornyx/stmtsummary' into HEAD
zhongzc fa60ecc
Merge pull request #3 from zhongzc/stmtsummary
mornyx dc67841
fix linting & bazel
mornyx c768c8c
fix build
zhongzc 7d92952
Merge pull request #4 from zhongzc/stmtsummary
mornyx 34ff06b
fix predicates
mornyx 3d982ce
Merge branch 'master' into stmtsummary
mornyx c56cc01
refine stmt v1 retriever
zhongzc f014848
Merge pull request #5 from zhongzc/stmtsummary
mornyx f29ba58
remove field 'Enable' in stmtsummary extractor
mornyx c76ebad
refine: use coarse time range
zhongzc c97bbd2
refine stmt summary v2 retriever
zhongzc d7ce5b0
tiny
zhongzc db456e6
Merge pull request #6 from zhongzc/stmtsummary
mornyx 2d1bd06
simplify locks
mornyx 84846b0
fix window creation in rotate loop
mornyx e665687
use warning instead of stop while parsing file meta
mornyx 1dddf0f
fix stmt files close
mornyx 8252148
some refine
zhongzc 3d77170
Merge pull request #7 from zhongzc/stmtsummary
mornyx a99f5ad
concurrent history reader
zhongzc 7c7fc1f
tiny
zhongzc 53e7ae1
Merge pull request #8 from zhongzc/stmtsummary
mornyx ba7d449
comment
zhongzc ab93000
Merge pull request #9 from zhongzc/stmtsummary
mornyx 838a6e3
Merge branch 'master' into stmtsummary
mornyx 774de35
fix stmt window lock
mornyx e851cba
fix unlock
mornyx 487aacd
Merge branch 'master' into stmtsummary
mornyx aa1ca21
fix
mornyx 127c1ae
update copyright
mornyx 198d960
optimize time ranges overlap
mornyx 3b55994
Update util/stmtsummary/v2/reader.go
crazycs520 a359ae9
Update executor/stmtsummary.go
crazycs520 0c9c01c
misc update
mornyx eed9d83
rounding time window
mornyx 583d619
make summary_end_time compatible
mornyx 4548bfb
revert time window rounding & fix ut
mornyx d12f573
Merge branch 'master' into stmtsummary
crazycs520 8712341
Merge branch 'master' into stmtsummary
ti-chi-bot c5914a7
Merge branch 'master' into stmtsummary
ti-chi-bot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Beside the difference between
stmtSummaryRetrieverV2
andstmtSummaryRetriever
, there are other changes:v.Extractor
Feeling curious about these.
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.
TableStatementsSummaryEvicted
andClusterTableStatementsSummaryEvicted
were handled separately, and the code organization was different from other tables. Here we just group them together instmtsummary.go
.v.Extractor.(*plannercore.StatementsSummaryExtractor)
will panic due to a type mismatch.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.
Previously, to retrieve
TableStatementsSummaryEvicted
andClusterTableStatementsSummaryEvicted
we usememtableRetriever
, butstmtSummaryRetriever
here. Do they act the same?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.
Yes, I just migrated this part of code(just a bit: https://github.com/pingcap/tidb/pull/40814/files#diff-feafb829b9dc329222267c9010f60ed7ce8800012c1e6dbcf6beb27d99e71b49L2308-L2323) to
executor/stmtsummary.go
. I think this will make stmtsummary code more independent.