Solr
  1. Solr
  2. SOLR-222

writeLockTimeout doesn't have effect

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.2
    • Component/s: update
    • Labels:
      None

      Description

      writeLockTimeout is set in SolrIndexWriter.init() method as follows:

      if (config.writeLockTimeout != -1) setWriteLockTimeout(config.writeLockTimeout);

      but this doesn't have effect because setWriteLockTimeout() is an instance method of IndexWriter and at this moment,
      IndexWriter's constructor had already been executed and write.lock had beed obtained in the constructor.

      To have effect, we should use IndexWriter.setDefaultWriteLockTimeout() class method before creating SolrIndexWriter instance.

      With the attached patch, I moved setWriteLockTimeout() to SolrCore and change it to IndexWriter.setDefaultWriteLockTimeout().
      I'm not sure it is an appropriate place, but it works.

      regards,

        Activity

        Hide
        Koji Sekiguchi added a comment -

        the patch attached

        Show
        Koji Sekiguchi added a comment - the patch attached
        Hide
        Yonik Seeley added a comment -

        Thanks, nice catch Koji!

        Show
        Yonik Seeley added a comment - Thanks, nice catch Koji!
        Hide
        Hoss Man added a comment -

        This bug was modified as part of a bulk update using the criteria...

        • Marked ("Resolved" or "Closed") and "Fixed"
        • Had no "Fix Version" versions
        • Was listed in the CHANGES.txt for 1.2

        The Fix Version for all 39 issues found was set to 1.2, email notification
        was suppressed to prevent excessive email.

        For a list of all the issues modified, search jira comments for this
        (hopefully) unique string: 20080415hossman2

        Show
        Hoss Man added a comment - This bug was modified as part of a bulk update using the criteria... Marked ("Resolved" or "Closed") and "Fixed" Had no "Fix Version" versions Was listed in the CHANGES.txt for 1.2 The Fix Version for all 39 issues found was set to 1.2, email notification was suppressed to prevent excessive email. For a list of all the issues modified, search jira comments for this (hopefully) unique string: 20080415hossman2

          People

          • Assignee:
            Unassigned
            Reporter:
            Koji Sekiguchi
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development