Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-2302

Simplify query debugging with MDC

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 1.0.9, 1.1.3
    • query
    • None

    Description

      QueryEngine in Oak has support for explain and measure to enable a user to determine how a query is executed by the engine. Result returned via explain call just tell what index would be used to execute the query. However often we need to see which all indexes were consulted and what cost were obtained from them.

      To get that data one has to enable debug level log for org.apache.jackrabbit.oak.query. Enabling them on a bigger system often results in lots of logs due to invocation of queries done by various part. Mostly the log is flooded with reference query invoked by authentication layer thus making it hard to find out relevant logs.

      To simplify getting only debug level logs for query which had explain enabled it would be helpful to provide support via MDC [1] (which is part of Slf4j API already being used in Oak)

      (patch and usage details to follow)

      [1] http://logback.qos.ch/manual/mdc.html

      Attachments

        1. OAK-2302.patch
          4 kB
          Chetan Mehrotra

        Activity

          People

            chetanm Chetan Mehrotra
            chetanm Chetan Mehrotra
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: