Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-14566

Record "request-id" on coordinator log messages

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 8.7, 9.0
    • None
    • None

    Description

      Currently, in SolrCore.java we log each search request that comes through each core as it is finishing. This includes the path, query-params, QTime, and status. In the case of a distributed search both the "coordinator" node and each of the per-shard requests produce a log message.

      When Solr is fielding many identical queries, such as those created by a healthcheck or dashboard, it can be hard when examining logs to link the per-shard requests with the "cooordinator" request that came in upstream.

      One thing that would make this easier is if the NOW param added to per-shard requests is also included in the log message from the "coordinator". While NOW isn't unique strictly speaking, it often is in practice, and along with the query-params would allow debuggers to associate shard requests with coordinator requests a large majority of the time.

      An alternative approach would be to create a qid or query-uuid when the coordinator starts its work that can be logged everywhere. This provides a stronger expectation around uniqueness, but would require UUID generation on the coordinator, which may be non-negligible work at high QPS (maybe? I have no idea). It also loses the neatness of reusing data already present on the shard requests.

      Attachments

        Issue Links

          Activity

            People

              gerlowskija Jason Gerlowski
              gerlowskija Jason Gerlowski
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 6h 10m
                  6h 10m