Lucene - Core
  1. Lucene - Core
  2. LUCENE-5289

IndexWriter.hasUncommittedChanges() returns false if there are pending delete by term only

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.4
    • Fix Version/s: 4.5.1, Trunk
    • Component/s: core/index
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      If there are only delete by term and no document adds, then IndexWriter.hasUncommittedChanges() returns false.

      http://lucene.472066.n3.nabble.com/Solr-4-4-Master-Slave-configuration-Replication-Issue-with-Commits-after-deleting-documents-using-DeD-td4094158.html

      1. LUCENE-5289.patch
        1 kB
        Shalin Shekhar Mangar
      2. LUCENE-5289.patch
        3 kB
        Michael McCandless

        Activity

        Hide
        Shalin Shekhar Mangar added a comment -

        Added a test to demonstrate the problem

        Show
        Shalin Shekhar Mangar added a comment - Added a test to demonstrate the problem
        Hide
        Michael McCandless added a comment -

        Thanks Shalin, I think this patch should fix it. It was failing to take into account any buffered changes that hadn't yet been "resolved" (which increments the changeCount).

        Show
        Michael McCandless added a comment - Thanks Shalin, I think this patch should fix it. It was failing to take into account any buffered changes that hadn't yet been "resolved" (which increments the changeCount).
        Hide
        Shalin Shekhar Mangar added a comment -

        Thanks Mike. Your patch has some unrelated changes in TestDemo.java too.

        Can we include this for 4.5.1? Solr's replication depends on this feature.

        Show
        Shalin Shekhar Mangar added a comment - Thanks Mike. Your patch has some unrelated changes in TestDemo.java too. Can we include this for 4.5.1? Solr's replication depends on this feature.
        Hide
        Michael McCandless added a comment -

        Thanks Mike. Your patch has some unrelated changes in TestDemo.java too.

        Woops, noise I'll revert that. Thanks for catching it.

        Can we include this for 4.5.1? Solr's replication depends on this feature.

        OK I'll commit & backport.

        Show
        Michael McCandless added a comment - Thanks Mike. Your patch has some unrelated changes in TestDemo.java too. Woops, noise I'll revert that. Thanks for catching it. Can we include this for 4.5.1? Solr's replication depends on this feature. OK I'll commit & backport.
        Hide
        ASF subversion and git services added a comment -

        Commit 1533164 from Michael McCandless in branch 'dev/trunk'
        [ https://svn.apache.org/r1533164 ]

        LUCENE-5289: IndexWriter.hasUncommittedChanges was returning false when only deletes were buffered

        Show
        ASF subversion and git services added a comment - Commit 1533164 from Michael McCandless in branch 'dev/trunk' [ https://svn.apache.org/r1533164 ] LUCENE-5289 : IndexWriter.hasUncommittedChanges was returning false when only deletes were buffered
        Hide
        ASF subversion and git services added a comment -

        Commit 1533167 from Michael McCandless in branch 'dev/branches/branch_4x'
        [ https://svn.apache.org/r1533167 ]

        LUCENE-5289: IndexWriter.hasUncommittedChanges was returning false when only deletes were buffered

        Show
        ASF subversion and git services added a comment - Commit 1533167 from Michael McCandless in branch 'dev/branches/branch_4x' [ https://svn.apache.org/r1533167 ] LUCENE-5289 : IndexWriter.hasUncommittedChanges was returning false when only deletes were buffered
        Hide
        ASF subversion and git services added a comment -

        Commit 1533168 from Michael McCandless in branch 'dev/branches/lucene_solr_4_5'
        [ https://svn.apache.org/r1533168 ]

        LUCENE-5289: IndexWriter.hasUncommittedChanges was returning false when only deletes were buffered

        Show
        ASF subversion and git services added a comment - Commit 1533168 from Michael McCandless in branch 'dev/branches/lucene_solr_4_5' [ https://svn.apache.org/r1533168 ] LUCENE-5289 : IndexWriter.hasUncommittedChanges was returning false when only deletes were buffered
        Hide
        ASF subversion and git services added a comment -

        Commit 1533263 from Michael McCandless in branch 'dev/branches/branch_4x'
        [ https://svn.apache.org/r1533263 ]

        LUCENE-5289: clarify that hasUncommittedChanges can still be true after commit, due to merges

        Show
        ASF subversion and git services added a comment - Commit 1533263 from Michael McCandless in branch 'dev/branches/branch_4x' [ https://svn.apache.org/r1533263 ] LUCENE-5289 : clarify that hasUncommittedChanges can still be true after commit, due to merges
        Hide
        ASF subversion and git services added a comment -

        Commit 1533265 from Michael McCandless in branch 'dev/branches/lucene_solr_4_5'
        [ https://svn.apache.org/r1533265 ]

        LUCENE-5289: clarify that hasUncommittedChanges can still be true after commit, due to merges

        Show
        ASF subversion and git services added a comment - Commit 1533265 from Michael McCandless in branch 'dev/branches/lucene_solr_4_5' [ https://svn.apache.org/r1533265 ] LUCENE-5289 : clarify that hasUncommittedChanges can still be true after commit, due to merges
        Hide
        ASF subversion and git services added a comment -

        Commit 1533266 from Michael McCandless in branch 'dev/trunk'
        [ https://svn.apache.org/r1533266 ]

        LUCENE-5289: clarify that hasUncommittedChanges can still be true after commit, due to merges

        Show
        ASF subversion and git services added a comment - Commit 1533266 from Michael McCandless in branch 'dev/trunk' [ https://svn.apache.org/r1533266 ] LUCENE-5289 : clarify that hasUncommittedChanges can still be true after commit, due to merges

          People

          • Assignee:
            Michael McCandless
            Reporter:
            Shalin Shekhar Mangar
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development