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

SLOW_QUERY support query slow log at any time. #14748

Closed
crazycs520 opened this issue Feb 12, 2020 · 0 comments
Closed

SLOW_QUERY support query slow log at any time. #14748

crazycs520 opened this issue Feb 12, 2020 · 0 comments
Assignees
Labels
type/enhancement The issue or PR belongs to an enhancement. type/usability
Milestone

Comments

@crazycs520
Copy link
Contributor

Feature Request

Is your feature request related to a problem? Please describe:

Currently, SLOW_QUERY only support to query data that parse from current slow-log file, can't query data from the rotated slow-log file.

Describe the feature you'd like:

To make SLOW_QUERY support query slow log at any time, need to do:

  • Support parse all slow-log file, contain the current and rotated slow-log file.
    • Locate which slow-log files meet the user-specified time range, this is to avoid parse all slow-log file.
  • Use Next to get a chunk of SLOW_QUERY data to avoid oom.

Describe alternatives you've considered:

compatibility

If user doesn't specified the query time range, only parse the current slow-log file, this behaviour is the same as before.

Teachability, Documentation, Adoption, Migration Strategy:

The development of this feature can be divided into the following steps:

  1. Use Next to get a chunk of SLOW_QUERY data to avoid oom. Move dataForSlowLog function to executor pkg.
  2. Make SLOW_QUERY support query slow log at any time.
  3. Make CLUSTER_SLOW_QUERY support query slow log at any time.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement The issue or PR belongs to an enhancement. type/usability
Projects
None yet
Development

No branches or pull requests

1 participant