You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Michael McCandless (JIRA)" <ji...@apache.org> on 2011/05/18 19:50:48 UTC

[jira] [Updated] (LUCENE-3116) pendingCommit in IndexWriter is not thoroughly tested

     [ https://issues.apache.org/jira/browse/LUCENE-3116?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael McCandless updated LUCENE-3116:
---------------------------------------

    Fix Version/s: 4.0
                   3.2

> pendingCommit in IndexWriter is not thoroughly tested
> -----------------------------------------------------
>
>                 Key: LUCENE-3116
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3116
>             Project: Lucene - Java
>          Issue Type: Test
>          Components: core/index
>    Affects Versions: 3.2, 4.0
>            Reporter: Uwe Schindler
>             Fix For: 3.2, 4.0
>
>
> 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:
> {noformat}
> --- lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/IndexWriter.java (original)
> +++ lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/IndexWriter.java Wed May 18 16:16:29 2011
> @@ -2552,7 +2552,7 @@ public class IndexWriter implements Clos
>          lastCommitChangeCount = pendingCommitChangeCount;
>          segmentInfos.updateGeneration(pendingCommit);
>          segmentInfos.setUserData(pendingCommit.getUserData());
> -        rollbackSegments = segmentInfos.createBackupSegmentInfos(true);
> +        rollbackSegments = pendingCommit.createBackupSegmentInfos(true);
>          deleter.checkpoint(pendingCommit, true);
>        } finally {
>          // Matches the incRef done in startCommit:
> {noformat}
> This did not cause any test failure.
> On IRC, Mike said:
> {quote}
> [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....
> {quote}
> 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: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org