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

Optimize and consolidate reuse of DocValues iterators for value retrieval

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • main (10.0)
    • 9.4
    • None
    • None

    Description

      DocValues are used for the purpose of arbitrary-order value retrieval mainly in two places:

      1. ExportWriter (for the export handler)
      2. SolrDocumentFetcher (for useDocValuesAsStored)

      ExportWriter holds a simple optimization to reuse docValues iterators where possible (i.e., where docId doesn't decrease), but there is no such optimization for SolrDocumentFetcher: for every possible docValues return field, for every doc, a new docValues iterator is pulled (and GC'd). This is especially pathological in the case of many sparse fields, because the hit is incurred regardless of whether the return fields are actually present in any returned docs.

      This issue proposes unifying the docValues iterator caching for both these contexts, with the most immediate practical effect being improved latency of field retrieval for useDocValuesAsStored.

      Attachments

        Activity

          People

            magibney Michael Gibney
            magibney Michael Gibney
            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 - 40m
                40m