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

Allow SnapshotDeletionPolicy to be reused across writer close/open

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.3
    • 2.4
    • core/index
    • None
    • New

    Description

      If you re-use the same instance of SnapshotDeletionPolicy across a
      close/open of your writer, and you had a snapshot open, it can still
      be removed when the 2nd writer is opened. This is because SDP is
      comparing IndexCommitPoint instances.

      The fix is to instead compare segments file names.

      I've also changed the inner class IndexFileDeleter.CommitPoint to be
      static so an instance of SnapshotDeletionPolicy does not hold
      references to IndexFileDeleter, DocumentsWriter, etc.

      Spinoff from here:

      http://markmail.org/message/bojgqfgyxkkv4fyb

      Attachments

        1. LUCENE-1184.patch
          9 kB
          Michael McCandless

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: