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

Allow SnapshotDeletionPolicy to be reused across writer close/open

Agile BoardAttach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

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

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment