Lucene - Core
  1. Lucene - Core
  2. LUCENE-1177

IW.optimize() can do too many merges at the very end

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3
    • Fix Version/s: 2.3.1, 2.4
    • Component/s: core/index
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      This was fixed on trunk in LUCENE-1044 but I'd like to separately
      backport it to 2.3.

      With ConcurrentMergeScheduler there is a bug, only when CFS is on,
      whereby after the final merge of an optimize has finished and while
      it's building its CFS, the merge policy may incorrectly ask for
      another merge to collapse that segment into a compound file. The net
      effect is optimize can spend many extra iterations unecessarily
      merging a single segment to collapse it to compound file.

      I believe the case is rare (hard to hit), and maybe only if you have
      multiple threads calling optimize at once (the TestThreadedOptimize
      test can hit it), but it's a low-risk fix so I plan to commit to 2.3
      shortly.

      1. LUCENE-1177.patch
        3 kB
        Michael McCandless

        Issue Links

          Activity

          Hide
          Michael McCandless added a comment -

          Attached patch. Will commit shortly to 2.3.

          Show
          Michael McCandless added a comment - Attached patch. Will commit shortly to 2.3.
          Hide
          Michael McCandless added a comment -

          Committed to 2.3 (and was already fixed on trunk).

          Show
          Michael McCandless added a comment - Committed to 2.3 (and was already fixed on trunk).

            People

            • Assignee:
              Michael McCandless
              Reporter:
              Michael McCandless
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development