[ https://issues.apache.org/jira/browse/LUCENENET-113?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12857017#action_12857017 ]
Judah Gabriel Himango commented on LUCENENET-113: ------------------------------------------------- We're receiving this issue when calling UpdateDocument. Yes, we commit after each Add and Update call. Here's what our code looks like: // Update code: this.indexWriter.UpdateDocument(matchingIdTerm, document); this.indexWriter.Commit(); ... // Add document code: this.indexWriter.AddDocument(document); this.indexWriter.Commit(); In the above snippets, indexWriter is a Lucene IndexWriter that is created at construction time, and reused throughout the duration of our app's lifetime. > 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. - If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira