[ 
https://issues.apache.org/jira/browse/OAK-7065?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16346271#comment-16346271
 ] 

Chetan Mehrotra commented on OAK-7065:
--------------------------------------

IndexUpdate should support a close operation for IndexEditor which should be 
invoked at the end of indexing cycle both in case of success and failure. 
Currently the index editor like LuceneIndexEditor implement this close logic by 
relying on {{leave}} call and checking if parent is null. However if there is 
some exception in any other editor then the editors do not get a chance to 
close.

So in case of failure LuceneIndexEditor should

# Close the IndexWriter
# Also ensure that any new files which have been added by the IndexWriter get 
removed

> Analyze case around failure of indexing cycle leading to orphan files
> ---------------------------------------------------------------------
>
>                 Key: OAK-7065
>                 URL: https://issues.apache.org/jira/browse/OAK-7065
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: lucene
>            Reporter: Chetan Mehrotra
>            Assignee: Chetan Mehrotra
>            Priority: Major
>             Fix For: 1.10
>
>
> If an indexing cycle fails for some reason it may leave orphan files in local 
> directory. Later on in next indexing cycle Lucene would try to create files 
> with same name on local disk and this may fail on Windows where such files 
> may have been memory mapped and hence cannot  be deleted.
> We should analyze such a scenario and see if system can handle the failure 
> case properly



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to