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

search logs: update sysutil to support search logs include invalid lines #2652

Merged

Conversation

baurine
Copy link
Contributor

@baurine baurine commented Jul 15, 2020

Signed-off-by: baurine 2008.hbl@gmail.com

What problem does this PR solve?

Related issues and PRs:

Problem Summary:

  • If the log files include invalid lines in the beginning or end, it will be skipped.
  • If the log files include invalid lines in the middle, the lines will be ignored.

What is changed and how it works?

  • Check at most 10 lines in the beginning or end to find the first valid line
  • Treat the invalid line in the middle as a normal log with pre valid log time and level

Check List

Tests

  • Unit test

  • Need to cherry-pick to the release branch

Release note

  • Support search the log file even it includes some invalid lines

…ines

Signed-off-by: baurine <2008.hbl@gmail.com>
@baurine
Copy link
Contributor Author

baurine commented Jul 15, 2020

Er, it seems I need to update dashboard as well? let me have a check.

Fix it by PR pingcap/sysutil#21

@baurine baurine marked this pull request as draft July 15, 2020 07:58
@baurine baurine marked this pull request as ready for review July 15, 2020 08:59
@baurine
Copy link
Contributor Author

baurine commented Jul 15, 2020

@breeswish @HunDunDM PTAL, thanks!

The failed test seems not related with this change.

Copy link
Member

@HunDunDM HunDunDM 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 Jul 15, 2020
@HunDunDM HunDunDM added the require-LGT1 Indicates that the PR requires an LGTM. label Jul 15, 2020
@HunDunDM
Copy link
Member

/merge

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

/run-all-tests

@ti-srebot
Copy link
Contributor

@baurine merge failed.

@breezewish
Copy link
Member

/run-all-tests

@ti-srebot ti-srebot removed the status/LGT1 Indicates that a PR has LGTM 1. label Jul 15, 2020
@ti-srebot ti-srebot added the status/LGT2 Indicates that a PR has LGTM 2. label Jul 15, 2020
@disksing disksing merged commit 2e033a7 into tikv:master Jul 15, 2020
@baurine baurine deleted the support-search-logs-include-invalid-lines branch July 15, 2020 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
require-LGT1 Indicates that the PR requires an LGTM. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants