[ 
https://issues.apache.org/jira/browse/LUCENENET-113?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12590524#action_12590524
 ] 

Digy commented on LUCENENET-113:
--------------------------------

I have a machine AMD Athlon 64 X2 Dual Core Processor, 2.30GHz + 1GB RAM + XP 
Home + Lucene from SVN
I ran the following code( which, I think, is faster than your loop since there 
is no db access) and got no exception.

{code}
void Test()
{
            IndexWriter wr = new IndexWriter("TempIndex", new 
StandardAnalyzer());
                        
            Document doc = new Document();
            doc.Add( new Field("Field1","some 
text",Field.Store.NO,Field.Index.TOKENIZED));

            for (int i = 0; i < 100000; i++)
            {
                wr.AddDocument(doc);
            }
            wr.Close();
}
{code}

DIGY

> adding documents to index does, in rare cases, cause an access denied to 
> segments.gen
> -------------------------------------------------------------------------------------
>
>                 Key: LUCENENET-113
>                 URL: https://issues.apache.org/jira/browse/LUCENENET-113
>             Project: Lucene.Net
>          Issue Type: Bug
>         Environment: Windows 2003
> Lucene.Net 2.1.0.3
>            Reporter: Pauli Østerø
>            Priority: Critical
>
> When updating an index via an indexwriter, does cause an access denied for 
> segments.gen.
> After investigation with FileMon the problem seems to be Lucene deleting and 
> creating the segments.gen with such a speed, that Windows occasionally 
> reports "DELETE PEND" when trying to open the file, which causes Lucene to 
> crash.
> A quick fix has been to do a try-catch when adding documents, and sleeping 
> the thread for 100 ms when encountering the UnathorizedException and trying 
> to add the document again.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to