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

sql: add a new optional secondary logger for internal slow queries #52377

Merged
merged 1 commit into from
Aug 19, 2020

Commits on Aug 17, 2020

  1. sql: add a new optional secondary logger for internal slow queries

    Previously, all slow queries were logged to the slow query log,
    regardless of whether they were internal or from the user. This made
    it easy for user queries to get lost in the log.
    
    This patch removes internal queries from the slow query log and adds a
    new optional opt-in cluster setting,
    `sql.log.slow_query.internal_queries.enabled`. When set to
    true, all internal queries that have service latency above the slow
    query log threshold will be logged to
    `cockroach-sql-slow-internal-only.log`. This new setting is a no-op if
    the slow query log hasn't been turned on, i.e there is
    no latency threshold set.
    
    Closes cockroachdb#50201
    
    Release note (sql change): adds a new cluster setting
    `sql.log.slow_query.internal` which when turned on in conjunction with
    the slow query log causes internal queries to be logged to an internal
    query only slow query log, at `cockroach-sql-slow-internal-only.log`.
    Internal queries are no longer logged to the slow query log. This new
    setting is opt-in, so default behavior is to not log internal slow
    queries.
    arulajmani committed Aug 17, 2020
    Configuration menu
    Copy the full SHA
    71d1502 View commit details
    Browse the repository at this point in the history