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

When using NRT, just init the reader from IndexWriter

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.5, 6.0
    • Component/s: None
    • Labels:
      None

      Description

      Spinoff from SOLR-4761

      Solr first opens a DirectoryReader from the directory, then later will pass this to IW openIfChanged.

      I noticed this when i was confused that mergedsegmentwarmer doesn't appear to work at first until after you've reopened...

      I'm not totally sure what the current behavior causes (does IW's pool reuse segments from this passed-in "external" reader, or is this causing some horrible doubling-up/inefficient stuff etc?). To some extent i think we should change it even if its actually performant: I think its confusing.

      I think ideally we'd change IndexReaderFactory's method to take writer instead of directory so that custom DirectoryReaders can still work.

        Attachments

        1. SOLR-4764.patch
          14 kB
          Robert Muir
        2. SOLR-4764_test.patch
          3 kB
          Robert Muir

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                rcmuir Robert Muir
              • Votes:
                1 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: