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

ConcurrentMergeScheduler should not stall its own merge threads!

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • None
    • 5.0, 5.1, 6.0
    • None
    • None
    • New

    Description

      http://build-eu-00.elasticsearch.org/job/lucene_trunk_linux_java8_64_analyzers/25834
      uncovered this issue.

      I accidentally introduced this with auto-IO-throttle (LUCENE-6119)
      ... the CMS.maybeStall method, which is supposed to block "segment
      producing" threads so indexing slows down when merges cannot keep up,
      can now sometimes block its own merge threads. This happens when the merge
      thread re-invokes CMS.merge after it finishes, so new merges can kick
      off.

      This is really silly, since merge threads are not segment producers,
      but rather the "messengers", spawned by the true segment producers,
      so CMS should not shoot the messenger here.

      I think it's also possible this could lead to deadlock in CMS, but I'm
      not certain, and I couldn't provoke it.

      I'd like to fix this for 5.0 because it was first introduced in 5.0
      and not yet released...

      Attachments

        1. LUCENE-6197.patch
          12 kB
          Michael McCandless
        2. LUCENE-6197.patch
          10 kB
          Michael McCandless

        Activity

          People

            mikemccand Michael McCandless
            mikemccand Michael McCandless
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: