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

CMS setters cannot work unless you setMaxMergeCount before you setMaxThreadCount

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.4, 6.0
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

        public void setMaxThreadCount(int count) {
          ...
          if (count > maxMergeCount) {
            throw new IllegalArgumentException("count should be <= maxMergeCount (= " + maxMergeCount + ")");
          }
      

      but:

         public void setMaxMergeCount(int count) {
          ...
          if (count < maxThreadCount) {
            throw new IllegalArgumentException("count should be >= maxThreadCount (= " + maxThreadCount + ")");
          }
      

      So you must call them in a magical order. I think we should nuke these setters and just have a CMS(int,int)

        Attachments

        1. LUCENE-5080.patch
          11 kB
          Robert Muir
        2. LUCENE-5080.patch
          9 kB
          Robert Muir

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: