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

Allow SnapshotDeletionPolicy to be reused across writer close/open

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3
    • Fix Version/s: 2.4
    • Component/s: core/index
    • Labels:
      None
    • Lucene Fields:
      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

      1. LUCENE-1184.patch
        9 kB
        Michael McCandless

        Activity

        Hide
        mikemccand Michael McCandless added a comment -

        Attached patch. I plan to commit in a day or two.

        Show
        mikemccand Michael McCandless added a comment - Attached patch. I plan to commit in a day or two.
        Hide
        mikemccand Michael McCandless added a comment -

        I just committed this. Thanks Tim!

        Show
        mikemccand Michael McCandless added a comment - I just committed this. Thanks Tim!

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development