lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler (JIRA)" <>
Subject [jira] [Created] (LUCENE-3116) pendingCommit in IndexWriter is not thoroughly tested
Date Wed, 18 May 2011 17:48:47 GMT
pendingCommit in IndexWriter is not thoroughly tested

                 Key: LUCENE-3116
             Project: Lucene - Java
          Issue Type: Test
          Components: core/index
    Affects Versions: 3.2, 4.0
            Reporter: Uwe Schindler

When working on LUCENE-3084, I had a copy-paste error in my patch (see revision 1124307 and
corrected in 1124316), I replaced pendingCommit by segmentInfos in IndexWriter, corrected
by the following patch:

--- lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/ (original)
+++ lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/ Wed May 18 16:16:29
@@ -2552,7 +2552,7 @@ public class IndexWriter implements Clos
         lastCommitChangeCount = pendingCommitChangeCount;
-        rollbackSegments = segmentInfos.createBackupSegmentInfos(true);
+        rollbackSegments = pendingCommit.createBackupSegmentInfos(true);
         deleter.checkpoint(pendingCommit, true);
       } finally {
         // Matches the incRef done in startCommit:

This did not cause any test failure.

On IRC, Mike said:

[19:21]	mikemccand: ThetaPh1: hmm
[19:21]	mikemccand: well
[19:22]	mikemccand: pendingCommit and sis only differ while commit() is running
[19:22]	mikemccand: ie if a thread starts commit
[19:22]	mikemccand: but fsync is taking a long time
[19:22]	mikemccand: and another thread makes a change to sis
[19:22]	ThetaPh1: ok so hard to find that bug
[19:22]	mikemccand: we need our mock dir wrapper to sometimes take a long time syncing....

Maybe we need such a test, I feel bad when such stupid changes don't make any test fail.

This message is automatically generated by JIRA.
For more information on JIRA, see:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message