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

Michael McCandless updated LUCENE-5574:
---------------------------------------

    Attachment: LUCENE-5574.patch

OK, I agree: let's do what's simplest/minimal here to fix the bug, and
just disable MDW's checking of unref'd files.

This new patch does that, and only one (test-the-tester) test needed
fixing.

I still also removed calling deletePendingFiles when closing the NRT
reader: I think it's just too dangerous.  And I added ensureOpen where
IFD actually deletes files...

Finally I made a test case, but I could not provoke corruption unless
I did a "hard delete" of the files in the index.  Ie, because IW is
write-once, even if you close and open a new one with OpenMode.CREATE,
the old writer won't delete files created by the new writer, I think.

I think it's ready.


> NRT Reader close can wipe index it doesn't own
> ----------------------------------------------
>
>                 Key: LUCENE-5574
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5574
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: core/index
>    Affects Versions: 4.8, 5.0, 4.7.1
>            Reporter: Simon Willnauer
>            Priority: Critical
>             Fix For: 4.8, 5.0, 4.7.2
>
>         Attachments: LUCENE-5574.patch, LUCENE-5574.patch, LUCENE-5574.patch, 
> LUCENE-5574.patch
>
>
> Today NRT Readers try to clean up unused files via their IW reference when 
> they are closed. Yet, if the index writer is already closed another index 
> could have been created on the same directory which can create the same files 
> as the IW before. For the NRT Reader those files are not referenced and it 
> will simply wipe them away. If you use this in a replication scenario where 
> directories are reused this can simply wipe your index away or in combination 
> with the FSync issue LUCENE-5570 create 0-byte files. I have a test that 
> reproduces this issue



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to