log: change slow log time format to compatible with pt-query-digest#10290
Merged
crazycs520 merged 3 commits intopingcap:masterfrom Apr 30, 2019
Merged
log: change slow log time format to compatible with pt-query-digest#10290crazycs520 merged 3 commits intopingcap:masterfrom
crazycs520 merged 3 commits intopingcap:masterfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## master #10290 +/- ##
================================================
- Coverage 77.8256% 77.8178% -0.0078%
================================================
Files 410 410
Lines 84715 84577 -138
================================================
- Hits 65930 65816 -114
+ Misses 13856 13845 -11
+ Partials 4929 4916 -13 |
Codecov Report
@@ Coverage Diff @@
## master #10290 +/- ##
================================================
- Coverage 77.6699% 77.6648% -0.0051%
================================================
Files 411 411
Lines 85441 85435 -6
================================================
- Hits 66362 66353 -9
- Misses 14117 14121 +4
+ Partials 4962 4961 -1 |
Member
|
/run-all-tests |
Member
|
@crazycs520 Please cherry-pick this to the release-2.1. |
crazycs520
added a commit
to crazycs520/tidb
that referenced
this pull request
Apr 30, 2019
winkyao
pushed a commit
that referenced
this pull request
May 5, 2019
crazycs520
added a commit
to crazycs520/tidb
that referenced
this pull request
May 9, 2019
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What problem does this PR solve?
Exec below
pt-query-digestwith--sincecommand will got error in old tidb slow log. Because of the slow log time format is not compatible with pt-query-digest.pt-query-digest --type slowlog --output report --limit=100% --since "2019-04-28 15:26:06" tidb-slow.logI try to find the MySQL slow log time format, But i got nothing in MySQL document or in google about the slow log time format. Then I check the MySQL slow log file, and find the most likely time format is
RFC3339Nano, but not exactly the same.Then I try to use
RFC3339Nanotime format, Thenpt-query-digestwith--sinceparam will execute successfully. Then I choseRFC3339Nanoformat as the new slow log format.What is changed and how it works?
Change slow log time format from "2006-01-02-15:04:05.999999999 -0700" to
RFC3339Nano("2006-01-02T15:04:05.999999999Z07:00").And for
Slow_queryparse slow_log compatibility, I still keep the old time format. Because if user was upgrade from old version, then there maybe 2 different time format in the same slow log file.Check List
Tests
Code changes
Side effects
Related changes