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

Expose explicit 2-phase commit in IndexWriter

    XMLWordPrintableJSON

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9, 2.0.0, 2.1, 2.2, 2.3, 2.3.1
    • Fix Version/s: 2.4
    • Component/s: core/index
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      Currently when IndexWriter commits, it does so with a two-phase
      commit, internally: first it prepares all the new index files, syncs
      them; then it writes a new segments_N file and syncs that, and only if
      that is successful does it remove any now un-referenced index files.

      However, these two phases are done privately, internal to the commit()
      method.

      But when Lucene is involved in a transaction with external resources
      (eg a database), it's very useful to explicitly break out the prepare
      phase from the commit phase.

      Spinoff from this thread:

      http://mail-archives.apache.org/mod_mbox/lucene-java-dev/200804.mbox/%3C16627610.post@talk.nabble.com%3E

        Attachments

        1. LUCENE-1274.patch
          39 kB
          Michael McCandless

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 336h
                336h
                Remaining:
                Remaining Estimate - 336h
                336h
                Logged:
                Time Spent - Not Specified
                Not Specified