Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-4462

Publishing flushed segments is single threaded and too costly

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 4.0-ALPHA, 4.0-BETA, 4.0
    • 4.1, 6.0
    • core/index
    • None
    • New, Patch Available

    Description

      Spinoff from http://lucene.markmail.org/thread/4li6bbomru35qn7w

      The new TestBagOfPostings failed the build because it timed out after 2 hours ... but in digging I found that it was a starvation issue: the 4 threads were flushing segments much faster than the 1 thread could publish them.

      I think this is because publishing segments (DocumentsWriter.publishFlushedSegment) is actually rather costly (creates CFS file if necessary, writes .si, etc.).

      I committed a workaround for now, to prevent starvation (see svn diff -c 1394704 https://svn.apache.org/repos/asf/lucene/dev/trunk), but we really should address the root cause by moving these costly ops into flush() so that publishing is a low cost operation.

      Attachments

        1. LUCENE-4462.patch
          13 kB
          Simon Willnauer
        2. LUCENE-4462.patch
          13 kB
          Simon Willnauer

        Activity

          People

            simonw Simon Willnauer
            mikemccand Michael McCandless
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: