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

IndexWriter.addIndexes copies raw files but acquires no locks

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 4.7, 6.0
    • None
    • None
    • New

    Description

      I see stuff like: "merge problem with lucene 3 and 4 indices" (from solr users list), and cannot even think how to respond to these users because so many things can go wrong with IndexWriter.addIndexes(Directory)

      it currently has in its javadocs:

      NOTE: the index in each Directory must not be changed (opened by a writer) while this method is running. This method does not acquire a write lock in each input Directory, so it is up to the caller to enforce this.

      This method should be acquiring locks: its copying RAW FILES. Otherwise we should remove it. If someone doesnt like that, or is mad because its 10ns slower, they can use NoLockFactory.

      Attachments

        1. LUCENE-5228.patch
          15 kB
          Michael McCandless

        Activity

          People

            mikemccand Michael McCandless
            rcmuir Robert Muir
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: